Dependency from multi instance call activity to main process

i have 3 levels of processes and they are multi instance.
process-> (n) subprocess1 -> (m) subprocess2.
n and m are number of instances captured at process and subprocess1 respectively.

starter.bpmn (12.3 KB)

how can i create dependency between all the T1.1.1 to T2.
i wouldnt know how many instances its going to be.
PS: I am using call activity, not Subprocess. i used subprocess in the bpmn just to explain my problem


BPMN diagram

Hi @Nishant_Agrawal,

you can model it this way, but you should use conditional events instead of signal receive events and service- or script tasks instead of signal throw events.

Throwing a signal is a broadcast that triggers all waiting process instances. (https://docs.camunda.org/manual/7.12/reference/bpmn20/events/signal-events/)

Hope this helps, Ingo

1 Like

Thank you very much for pointing out to conditional events.
Is there any way i can collect the process variables of each subprocess (multi instance) and somehow show it in the main process task.
My thoughts-
What if i create a map variable and keep appending from each subprocess. But not sure how would i display that in the form. Because i dont know how many instances are going to come. And how can i use map/list to show values in the form.

Hi @Nishant_Agrawal,

I understand your use case, that both branches should only continue after all user tasks T1 and T1.1.1 are completed.

For this it would be sufficient to compare a process variable against a counter (conditional event) and increase the process variable each time a user completes its task.

Hope this helps, Ingo

1 Like