Dynamic parallel multi instance Sub-Processes

Hello all,

I have modeled parallel multi instance Sub-Process element, but I want to create them dynamically.
I mean I have 2 different type of sub-processes (SubProcess1 and SubProcess2). I want to create 3 instance of first sub-process and 5 instance for second one.

Before this sub-process I have service task where I can define the quantity and kinds of the sub-processes.

As I understand I can set Sub-Process Called Element parameter like that : ${taskSubProcessName} , but how I can do it for different and multiple times ?

Also then how I can set separate “Collection” parameter for each of them.

Any idea will be appreciated,

Best Regards,
Paata.

Use a call activity for your sub process then use a expression in the called Bpmn def that is from your element of the multi instance.

Can you upload your model?

Hello @Niall

Main Process
diagram_1

First SubProcess

Second SubProcess
diagram_3

Into Service Task :“Define Sub-Processes” I have defined dynamically how many subprocess I have and what is their kinds, for example 1 sub-process 10 instance and second 15 instance.

Regards,
Paata.

Hi @paata,

if you create a collection with elements like {"subprocess1", "subprocess1", "subprocess1", "subprocess2", "subprocess2"} you can reach your goals.

Hope this helps, Ingo

Hello @Ingo_Richtsmeier
Thank you very much for your reply.

Call Activity has Property : “Called Element”, where should be defined Name of SubProcess . How it should be dynamic ? can I pass collections here ? if yes, then how to pass “Collection” parameter for each SubProcess ?

Regards,
Paata.

Hi @paata,

please have a look into this post: Possible to have multi instance call activity - but each iteration with different calledElement dynamically?

Hope this helps, Ingo

1 Like