Throw-Catch Signal to close a task in the same case


Hello there!

Am using Bonita 7. My requirement is to close task A when task B is closed. So, I have place a throw signal on the output flow from task B and attached a catch signal to task A. The problem is when task B is closed in one case, all the catch signals in all the cases created for this process are being fired and all task As are being closed, which is not correct.

Also, as the throw signal name is free text, am not sure how to specify a unique name for each signal for a case. Pl advice how to achieve the requirement so that throw-catch for one case does not effect other cases.


1 answer

This one is the BEST answer!


Actually signal are broadcast across all processes instances and each catch event listening for a signal will be triggered when signal is sent (based on signal name only).

My recommendation is instead to use messages. In order to target a specific instance you need to use correlation in the message configuration and use the processInstanceId variable.

I create a simple example to illustrate that.


Submitted by rjrjswrdvi on Mon, 07/31/2017 - 13:34

Thanks for the effort Antoine! It was of great help!

Submitted by jescobara on Fri, 08/24/2018 - 23:31

I have a similar problem, but I have multiple task that i need to finish when a condition is complete.

Your example works with one task, but I have five task.

Do you know how I can do that, It's your same example, but with five task A that will be finish when the task b it's complet.

thanks for your help

Submitted by antoine.mottier on Mon, 08/27/2018 - 10:03

Just to make sure I correctly get your use case: you have one definition of "Task A" but in "General" -> "Iteration" "Parallel multi-instantiation" is selected. Is that right?

Note: I know your question is similar to the topic of this thread but we usually recommend to create a new one and eventually include a link to the existing post in your question.