Kill parallel task

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

Kill parallel task

Hi everybody!!

Please help!!! I need some guidance with this problem, I have a parallel task runing but when i finish the antepenultimate task i need to kill the other task.

Below there is an example, when I finish the task number three then the task number two must finish too

Thanks for your time Smiley Happy

4 Replies
vhelmut
Active Member II

Re: Kill parallel task

Hi, ara giliel‌!

Can you to give more information about your workflow? You say:

when I finish the task number three then the task number two must finish too

Let's answer some questions about expected result:

Should workflow end after task3 and task2 have been completed both?

  • Your сurrent bpmn model means that:
    1. task1 and task2 will be create in the same time;
    2. workflow has been completed if:
      1. task3 and after that task 4 will be completed;
      2. OR task 2 will be completed.

BPMN notation allows one and more end events, but when you reach any end event your workflow will be completed. One parallel gateway before tasks means that they will be create in same time, not complete.

If it necessary to complete task 2 and task 3 both before workflow completes, you must add one more parallel gateway.

If it necessary to complete task 2 when the task 3 completes you may use inclusive gateway which:

  • sources will be task 3 and task 2 both;
  • target: task 4 or end end.  

Anyway, I can`t clearly understand conditions create\complete of 4th task: does it mandatory? 

Also, if  task 2 and task 3  have same model types you can:

  • make one task instead of 2 and 3;
  • use multi instance with a condition  nrOfCompletedInstances > 0. You can read more about it in the Activiti userguide

But last method be useful, if when the task 2 will be completed earlier than task 3, task 3 must be completed too. 

I hope, i have give you some ideas how to solve your problem!

If you have questions I will be glad to answer it. When the requirements are clear it is very easy to build right model Smiley Happy

Good luck!

bhchemss
Established Member

Re: Kill parallel task

Hi Victoria,

If the workflow reach an end event (not terminate end event) , the workflow will not be completed if there is an active task , in this case , completing task 2 will not end the workflow and the model is correct, that's BPMN conform.

bhchemss
Established Member

Re: Kill parallel task

Hi ara,

I think throwing a signal after completing the task 3 to an boundary signal event in Task 2 could solve your problem.

arag
Active Member II

Re: Kill parallel task

Thanks!!!! thanks!!! and thanks!!!!! you saved my life!!! Smiley Happy