This is my scenario.
First some parallel path are created and joined together in a converge gateway.
But if some condition met when a path come to the gateway, there is no need to continue other paths, the gateway need to be able to decide to stop all the other active path and then start out going transitions.
How can I implement that using Bonita?
You can achieve this behaviour with a sub process:
-
Model the parallel paths in a sub process.
-
Join the parallel paths in the sub process with an exclusive gateway. This gateway just forwards each arriving token. So the parallel tokens are not merged, but they move on independently from each other.
-
After the joining exlusive gateway, add a splitting exclusive gateway with two exits: The default exit leads to a normal end event, the other exit - with your specified condition - leads to a terminate end event. So if your condition is met, the sub process is entirely terminated, and the top level process will be continued. If the condition is never met, all parallel tokens will eventually reach the normal end event, before the top level is continued.