cancel
Showing results for 
Search instead for 
Did you mean: 

How to loop group of tasks in an activiti

chandanmb1
Champ on-the-rise
Champ on-the-rise

I have seen about Multi-instance usage about looping of a particular task in activiti. But i have a scenario where looping has to happen between group of activities sequentially. 

Example

  

                             Start -----> UserTask 1------> UserTask 2 ---- End

In the above sample workflow, UserTask 1 and UserTask 2 together has to loop one after the other 5 times sequentially.

Is it possible in activiti ? What is the approach to achieve the above use case ?

2 REPLIES 2

paiyyavj13
Star Contributor
Star Contributor

Hi chandanmb,

I think what you can do is make use of Call Activity within your process, your main process could call a subprocess which can have the tasks that would be performed in sequence. And if you configure your Call Activity to be a Parallel Task then you can run the subprocess the number of times you want.

Regards.

thuynh
Star Contributor
Star Contributor

Hi chandanmb _ ,

It would be much helpful if you can describe your use case so people understand what you're trying to model before jumping right away to the technical part.

UserTask 1 and UserTask 2 together has to loop one after the other 5 times sequentially.

Sounds like you're looking for Multi-instance modelling of BPMN? Activiti User Guide 

Thanks,

Thong