About 'Error Boundary Event' handle with sub process

I have set an Error Boundary event in my sub process(below pic), i try use ‘S3’ task to handle ‘S2’ task error if error occur in ‘S2’, i hope that back to sub process logic after ‘S3’ completed, and then execute main process (‘S4’) after sub process over!

Unfortunately, the real situation is executed according to the following path:
S1 → S2 → S3 → Over!!
Expect path is:
S1 → S2 → S3 → S4 → Over!!

If i change parallel to sequence and i got an expect result!
S1(error) → S3 → S2 → S4 → Over!!

And then if there exist a sub-event-process path:
S1(error) - > S4 → Over!!

Doc with BPMN Error Boundary Event said:

An intermediate catching error event on the boundary of an activity, or boundary error event for short, catches errors that are thrown within the scope of the activity on which it is defined.

Defining a boundary error event makes most sense on an embedded subprocess, or a call activity, as a subprocess creates a scope for all activities inside the subprocess. Errors are thrown by error end events. Such an error will propagate its parent scopes upwards until a scope is found on which a boundary error event is defined that matches the error event definition.

When an error event is caught, the activity on which the boundary event is defined is destroyed, also destroying all current executions therein (e.g. concurrent activities, nested subprocesses, etc.). Process execution continues following the outgoing sequence flow of the boundary event.

It seems like non-effects with sequence sub process even though error occur!!

Is really that?

Pls suggest .

The problem isn’t with the error boundary event, the problem is with your parallel synchronizing gateway.
You have 3 sequence flows going into it and so it’s expecting 3 tokens before moving forward. But because only 2 tokens will ever arrive it causes a deadlock
Do something like this: https://cawemo.com/share/aad4b1d4-084a-488f-8d79-808280b46535

You are right, i got it!

I will take the time to read the documentation and related source code to understand the learning more deeply.


1 Like