[Resolved] - Multiple instanciation - Task loop and cancelation

Hi everyone!

I have a process that calls two sub-process which are the same process. (X calls Y1 and Y2), and Y_Is the same process but I send two different settings.

These sub-processes are basically one loop-task asking if the user wants to approve or cancel something. The loop task is set for a list of approvers, and each loop task is independent.
But what my problem is: I want to cancel the other task when one is refused.

For example :
X calls Y1 and Y2.
Y_ have a loop task with 2/3 “loop” for 2/3 users.
Y_ display a form with 2 buttons: continue and cancel. If the user chose to cancel the process Y1, I want the task from Y2 to be removed and the process to stop.

I tried to send a message when I cancel the task and catch it with a Boundary Catch Message on the other process, then the catch Message goes to a “Terminate End”.
But this does not works properly, it catch the message goes to the Terminate End (I guess) but it keep the task.

Maybe I use the message event wrong or perhaps it’s because of my task-loop that does not work.
If anyone have a clue for my problem of a fix.

Hello
Check out something called “Early Completion Criteria”. Each Multi Instantiation task has a Early completion criteria. It expects a Boolean value. If the return is true then stop multi instantiation else continue.
perhaps you can evaluate your scenario and derive a Boolean output.

regards

Thanks for the answers.
The issue was that I call the subprocess from two differents “sub-process block”. It was not the same block that create two parralels instances. And each one is independant and has his own life.

I finally solve my issue with a message. I tried to use it before but it keeps creating the task because it was a loop process, even if I stopped one loop it was going back in it. I solve it by stoping the loop.

You have two terminal components, one with color fill red and other one with red color (less strong). You have to use this. You have to make this for all the instance in process Y2, if you have two instances only one can recieve the message. You have to check if another instance (brother) exists.