Reading Time: 9 minutes
Mule 3 has many routing processors and expression evaluators that can be used to implement routing logic. However, sometimes business rules may be too complex. For example, one of our customers is a large logistics company which uses Mule for their warehouse routing. To handle their complex set of rules, they decided to use Mule with jBPM and Drools.
This example illustrates use of Drools and jBPM inside Mule, by implementing very simple order sorting and warehouse routing use case. In this scenario all orders with weight greater than 50lbs should be routed to the warehouse A, and orders with weight equal to 50lbs or less should be routed to the warehouse B.
The sample orders are randomly generated and dispatched to the UnsortedOrders JMS queue. The jBPM process consumes unsorted orders and invokes Drools to make a decision on which warehouse this order should be routed to.
Continue reading →