cancel
Showing results for 
Search instead for 
Did you mean: 

How to start sub-process multiple times

amruta_w
Star Collaborator
Star Collaborator

Hello,

 

I have created two processes namely "main process" and "child process".

In "main process" i am calling the "child process" using call activity sub process, my question is i want to start "child process" N number of times in "main process". How can i achieve this?

 

Here i have attached my app for reference.

 

Kindly anyone help me in this.

 

Regards

Amruta Wandakar

1 ACCEPTED ANSWER

I've attached a modified version of your app here.

View answer in original post

9 REPLIES 9

eugenio_romano
Elite Collaborator
Elite Collaborator

Is an ADF related question or is more APS/Activiti in general?

I have developed app in APS and using ADF as front end.

   This seems to be more workflow related, how many is N ?

Hi Eugenio Romano‌, can't define N. the child process should able to start as many times user wants.

bassam_al-saror
Star Collaborator
Star Collaborator

This is a question should be in process services bpm forum.

Activities can have properties that specify if they are multi-instances or single instance (default). Take a look on multi-instance properties here Call activity | Alfresco Documentation. You can use 'Cardinality' property to specify how many times the activity should be executed.

Thank you Bassam Al-Sarori‌ for reply. I have tried this way multi-instances will allow me to choose Parallel or Sequential. If i use this features it will not allow me to create new process instance(means complete running "child process" and start again new "child process" in the "main process", this will allow to edit the already completed "child process"). The Cardinality property if i use i need to specify the number but in my case i don't want to stick to number it should be user based. The user should be able to start as many times he/she wants.

bassam_al-saror
Star Collaborator
Star Collaborator

Using Sequential will allow you to start child processes only after the previous one completes. Cardinality can be an expression i.e. ${times} where that can be a form field or a process variable. Additionally, Completion Condition can be used to continue creating child processes until a condition is met.

I've attached a modified version of your app here.

Thank you the solution worked for me. Only thing is i need to specify the times is there any alternative way for this like instead of asking users to specify the "child process" times which you've provided.