Conditionals flows with or without exclusive gateway ?

1
0
-1

Hello.

With Bonita Studio (6.2.6), on a task exit, you have two solutions for making a conditional exit : 1) directly from a task, you can put a conditional flow (with a diamond symbol) and a default flow ; 2) on the task exit, you can put a sequence flow then a exclusive gateway with a conditional flow and a default flow.

The two solutions seems to be BPMN compliant (no error on the studio).

On the first solution, locals variables of the task can be used for the conditional test (I think it is good for performance : no variable persistence) ; on the second solution, locals variables isn't usable on the gateway (variables must be globals).

In my opinion, the second solution is more readable.

Which solution is the best ?

1 answer

1
0
-1

Personally I advocate for the second solution (gateways) mainly because the diagram become more readable. Gateways really help to make sure that what have been split with one kind of gateway is merged with the same one. Relying on "implicit gateways" (multiple outgoing or incoming transitions) seems error prone to me.

About the fact that data will be saved by Bonita Engine (as it doesn't support process transient data): it is, in my opinion, not an issue and can even be an advantage. In fact, data used for transition condition are usually boolean, so will not require a lot of resources in order to be saved. Also, in cased of server shutdown, Engine should be able to recover the execution thanks to database transactions.

Notifications