Posts

Showing posts with the label Inclusive Gateway (OR)

Comparison in Gateways of jBPM: Inclusive vs Parallel vs Exclusive

Image
When modeling business processes in jBPM , gateways are crucial elements that control how the workflow branches and merges. Choosing the right gateway ensures that your process logic behaves as expected. In this post, we’ll break down the differences between the three most common gateways: Inclusive (OR) , Parallel (AND) , and Exclusive (XOR) gateways. 🔹 Exclusive Gateway (XOR) Behavior: Only one outgoing path is taken, based on conditions. Conditions are evaluated in order; the first one that evaluates to true is followed. You can also configure a default path if no condition matches. Use case: Choosing a meal based on budget or preference (only one meal can be selected). Example condition (MVEL): budget >= 300 && isVegetarian == true 🔹 Parallel Gateway (AND) Behavior: All outgoing paths are taken simultaneously . No conditions are checked—every branch runs in parallel. At the merge point, the parallel gateway waits for all incoming f...