Are gateways considered execution points?

Considering this illustrative example of a workflow:
workflow_illustration

I’d like to know if gateways are considered execution points (my instincts tell me they’re not) such that local variables that I set in the first service task are available at GW2. I haven’t come across anywhere in the docs that’s specific as to whether or not gateways are execution points.
Thanks

Hi,

what do you mean by

Martin

According to the “variables” section of the docs “a process instance consists of a tree of executions” so I assume the various elements (except sequence flows a.k.a the arrows :slight_smile: ) points of execution in the graph; but please don’t let my assumptions deter from the original question.

Hi,
I am still not sure what execution point means but when you want to debug executions you could try debugger which is part of 6.3.0 release (to enable debugger set flowable.experimental.debugger.enabled=true and go to show diagram in flowable-task app)
As you can see before exclusive gateway activity is executed there are 3 executions active. One is root process and one is execution stopped on the activity excGateway.
image

when you trigger execution
image

the executions remain the same the only thing which has changed is activityId.
The executions behave differently when yo use e.g. parallel gateway.

Regards
Martin

Hi,

No, gateways are not considered execution points. Setting a local variable on the execution in the service task will be available in the next sequence flows that will reuse the same execution. This is however not good design, because if you would add a parallel gateway after the service task, this won’t be valid anymore for example. Because that will create new executions for the outgoing paths of the parallel gateway.

If you would like to set a local variable on the service task and use them in the following gateways, the best way would be to use an embedded sub process with the service tasks and gateways in it. Then you can set a local variable on the embedded sub process and that variable will be available in the whole embedded sub process scope.

Best regards,

Tijs

1 Like

Thank you very much.

I wasn’t aware of a 6.3.0 release or the debugger feature, but thanks for the insights.