Drools & Prova Transport
This modules allows Mule components to interact with JSR-94 rules engines and also provides Rules-based message routing.
The key components ProvaUMOImpl.java and DroolsUMOImpl.java are used for sending and (for Prova agents) receiving messages.
There are three parallel conversations ongoing at the same time.
(1) Agent001 sends tow messages to Agent002;
(2) Drools agent notifies Agent002 about a state change;
(3) A more complex scatter-gather protocol for a Manager and two Worker's. The actual code for Worker's is uploaded to the Worker's by the Manager in a mobile-agent fashion.
There is only one rulebase behind each UMO descriptor, which means that if Mule creates several instances, the access from them to the rulebase happens in parallel and in the case of a conversation protocol, should be executed in lock-step. Imagine that an agent expect messages A and then B. If B arrives first due to the thread parallelism, the agent will be in an incorrect state. Lock-step execution always exchanges messages in pairs, i.e., an ack is sent for each message, and then the other side continues.
The formalism behind the agents is based on pi-calculus. It allows for sending and receiving messages in the rule bodies as well as sending agent addresses and conversation-id's as part of each message.
The project uses both Maven 2 and a Maven 2 plugin for Eclipse so it can be run from both.
The examples requires Prova 2.0 Beta 3 that is included in the local Maven repository.