Conditional boundary event on multiple instance call activity

Hi everyone,
I have a following situation:
simplified BPMN model


ItemList contains only two integer values- 1 and 2.
Boundary event condition is as shown in the screenshot item==2.
Item is the element variable from ItemList on this multiple instance call activity.
I expected that this will trigger timer after boundary event and prevent calling activity for item 2.

This is what actually happens: conditional event isn’t triggered at all.
Can somebody explain why this is happening?

Thank you in advance

Hi @JuLog,

the conditional event is not triggered because the variable item is stored in a different scope. The conditional event is attached to the call-activity and can see all variables of the process instance. The variable item is a local variable in the scope of the multi-instance call activity.

You can fix the model if you wrap the call activity + conditional boundary event into an embedded sub-process and mark the sub-process as multi-instance (instead of the call activity).

Does this help you?

Best regards,
Philipp

Yes, it does. Thanks a lot!