cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel Flow - How to complete rest of the tasks when any one of the task completed in parallel flow

swamy2156
Champ on-the-rise
Champ on-the-rise
Hi,

As per my business requirement, I need to add a Parallel flow gateway with 7 user tasks. I need to complete first 5 user tasks if 6th task is completed. Similarly, complete first 6 tasks if 7th task is completed. Can someone suggest me the best way to handle this scenario using activiti.

Thanks in advance,
Swamy.
4 REPLIES 4

swamy2156
Champ on-the-rise
Champ on-the-rise
Addition to my previous post:

My requirement is, when a new resource joined in my team, he need to complete 7 levels(i.e, userTasks here) of training program. If he completed level6(UserTask6) or level7(UserTask7) directly despite of order, system need to auto complete remaining levels Attached BPMN model and need to create Next Stage of training program UserTask8 for only one time. Can some one guide me how to handle this scenario using activiti.
(attached bpmn model text file for your reference)

Thanks in advance,
Swamy.

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Swamy,

Not the best, but still some solution could be to put service task after the level task N to complete all (N-1) user tasks,

The Way Which I would implement the requirement would be ->
1. One user task
2. In the user task, user can choose the level.
3. after the task complete service task evaluates the logic whether to continue with the next level or not (loop to the user task again)


Regards
Martin

swamy2156
Champ on-the-rise
Champ on-the-rise
Thanks Martin… followed your solution and its working..

Regards,
Swamy.

pmsevestre
Champ in-the-making
Champ in-the-making
Why don´t you replace your tasks with a single multi-instance task ? Check this excerpt from the Activiti Guide:

A multi-instance activity ends when all instances are finished. However, it is possible to specify an expression that is evaluated every time one instance ends. When this expression evaluates to true, all remaining instances are destroyed and the multi-instance activity ends, continuing the process. Such an expression must be defined in the completionCondition child element.

It seems to exactly what you need.