Hello, can you explore my diagram and explain, why all subprocess tokens aren’t terminating? By my undertanding they should vanish when a == 3. It seems to be that terminate event kills only last token and not the first two.
test.bpmn (7.5 KB)
Hello, can you explore my diagram and explain, why all subprocess tokens aren’t terminating? By my undertanding they should vanish when a == 3. It seems to be that terminate event kills only last token and not the first two.
Hello @Mikhail.Savelov ,
the Terminate End Event
only works inside the scope it lives, here the Event-based subprocess
. What you could do now is this:
Or even easier:
Hope this helps
Jonathan
Thank you, but I did not understand this example. I constructed my test to clarify behaviour of terminate event.
Terminate event kills tokens inside its scope. So I expect this:
But it only kills third token, and everything after it. First two tokens remains untouched. I simply want to understand, why is it happening? Shouldn’t Terminate-event clean my subprocess entirely?
Hello @Mikhail.Savelov ,
every time the timer is triggered, a new instance of your event-based subprocess
is created (behaviour of a Start Event
). Inside this instance, all tokens will be consumed by the Terminate End Event
.
You can see this on the bottom left of your screenshot, where the event-based subprocess
is annotated with a “2”. So, 2 instances are active, 1 was ended.
Jonathan
It makes sense now, thank you.
This may be unjustified, but I don’t trust conditional events (conditions might be transient and not detected by the engine) and prefer explicit event firing. Hence, in the solution of @jonathan.lukas, I’d made the following changes:
Has anybody used conditional events extensively? What is your experience?