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

1
0
-1

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.

Juan

2 answers

1
0
-1

Dear Antoine,

May you please clarify: "You can (???) the items list to dynamically create one child process instance per item and pass the item to the child process instance."

In my case I create the item list in the initiation form, but when I go to the call activity iteration tab I have no variable of type list to select and so nothing to iterate from...

My model:

ParentItem
> ParentId (TEXT)
> ParentName (TEXT)
> ChildItems (ChildItems - multiple)

ChildItem
> ChildId
> ChildName

My initiation contract is:

ParentItem
> ParentId (TEXT)
> ParentName (TEXT)
> ChildItems (ChildItems - multiple)
> ChildId
> ChildName

So user is creating his list of item during the initiation, with the initiation form. Then the initiation is directly linked to the call activity task.

How to create/specify the list variable to call, if I just want to call a subprocess for each item of the list?

Thanks a lot in advance for your help..

Kind regards,

1
0
-1

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.

Comments

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.
Ex.
Model
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.

Submitted by t.delhaise_1381938 on Mon, 06/28/2021 - 07:18

Dear Antoine,

May you please clarify: "You can (???) the items list to dynamically create one child process instance per item and pass the item to the child process instance."

In my case I create the item list in the initiation form, but when I go to the call activity iteration tab I have no variable of type list to select and so nothing to iterate from...

My model:

ParentItem
> ParentId (TEXT)
> ParentName (TEXT)
> ChildItems (ChildItems - multiple)

ChildItem
> ChildId
> ChildName

My initiation contract is:

ParentItem
> ParentId (TEXT)
> ParentName (TEXT)
> ChildItems (ChildItems - multiple)
> ChildId
> ChildName

So user is creating his list of item during the initiation, with the initiation form. Then the initiation is directly linked to the call activity task.

How to create/specify the list variable to call, if I just want to call a subprocess for each item of the list?

Thanks a lot in advance for your help..

Kind regards,

Notifications