Create a Process and create Subprocess from the list with "Call Activity" and "iteration" (multi-instantiation parallel)


Dear, it is difficult for me to be able to model a process of the type father and son or master detail with the use of the call to the Activity.

So far I have only modeled a single process in a simple way. I have not even needed to send messages, which I'm sure I'm wasting a lot of power.

I have deployed the Procurement requests example process but it It has good things but it is useful as a starter.
My need is the following:
I initiate an application process with a list of purchase items. When it passes to the Chief to approve there should be so many independent instantiated Sub-processes with the same Parent Process so that each process continues with a task of approving the item.

Then all the Subprocesses would go through their different states until they finish and conclude the Father process.

Is this possible after the instantiation of the Father Process to make a "Call to activity" with iterator (multi-instantiation parallel) for each item?
How should I design with the BDM where the BDM contains 2 tables, Request and item Purchase?

Each subprocess will be attended independently.

I already appreciate the help that will be extremely important to me.


1 answer


Yes this is totally doable and you are in the good direction: you should use a multi-instantiated call activity using "parallel multi-instantiation". You can the items list to dynamically create one child process instance per item and pass the item to the child process instance.


Submitted by jagch on Wed, 05/29/2019 - 02:15

Thank you, I will try to make the attempt.

In the BDM, the data of the parent process must be related to the data of the children.
parent process
children process

Attributes parent process
idParentProcess "string"
atr1 "string"
atr2 "string"
idchildrenprocess "children process" (Multiple)

Someone has some example of how to do it. I guess it's something relatively frequent to model.

Only that up to now I have treated the process as an individual case and I have not needed sub processes

Thank you

Submitted by antoine.mottier on Mon, 06/03/2019 - 19:29

If I understand correctly both your parent and child processes need to read/update the same unique business variable. In order to do so you will need to declare the variable in both parent and child processes. Variables need to have the same type but can have a different name (e.g. parent and child).

The default value of the variable in the child process must be empty (assuming you set the initial value of the variable in the parent process before calling the child process).

Configure the call activity, in the "Execution", "Data to send" tab. You can click on the "Add" button and in the select list on the left hand side select the variable in the parent process, in the select list on the right hand side select the variable in the child process and in the select list in the middle choose "Assigned to Data".

This setting will not duplicate the business variable declared and initialized in the parent in the child process but rather initialize the child process variable to target the existing data.