How to loop group of tasks in an activiti

cancel
Showing results for 
Search instead for 
Did you mean: 
chandanmb1
Active Member

How to loop group of tasks in an activiti

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
paiyyavj13
Established Member II

Re: How to loop group of tasks in an activiti

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
Established Member II

Re: How to loop group of tasks in an activiti

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