cancel
Showing results for 
Search instead for 
Did you mean: 

Multi-instance Sub-Process, cancel specific instance

edgarjoao
Champ in-the-making
Champ in-the-making
Hi,
I do have a Multi-instance sub-process, I need cancel a specific instance for this Multi instance subprocess.
I have a Receive Task with a SignalThrowEvent and boundarysignal for catch the signal event, when I send a signal event it calls every instance into my Multi-instance sub-process.

What can I do in this case?

Attached is the bpmn and test case.

Thanks,
Edgar
15 REPLIES 15

edgarjoao
Champ in-the-making
Champ in-the-making
Hi Martin,
Is there a way to send cancel signal using subprocess execution id  instead of execution id of the Task?

Edgar

edgarjoao
Champ in-the-making
Champ in-the-making
Any comments?

edgarjoao
Champ in-the-making
Champ in-the-making
Same issue trying from API Rest

GET http://localhost:8080/activiti-rest/service/runtime/executions?activityId=receivetask4&processInstan...

PUT http://localhost:8080/activiti-rest/service/runtime/executions/109
       {
          "action":"signal"
       }

Result: Cancel all sub instances Smiley Sad

Is there a workaround for this??

edgarjoao
Champ in-the-making
Champ in-the-making
Seems like the unique way to accomplish this is moving from sub-process multi to Activity-multi. Smiley Frustrated

jbarrez
Star Contributor
Star Contributor
Thanks for the excellent unit test. Trying to figure out what was happening was quite challenging.

So you've got 6 Multi-Instance subprocesses going one. And then you fire a signal. The problem is that ALL your boundary signal events listen to that particular signal event. The scope of the signal is the process instance, so everybody listens. That is why ALL the subprocesses get destroyed (all the boundary events listen), and why you are getting back that all subprocesses are gone instead of the one you expected.

So you probably have to remodel your process … maybe the receive task needs to be moved to _inside_ the 3th subprocess … and it goes to an error event then that gets caught on the boundary?

edgarjoao
Champ in-the-making
Champ in-the-making
I have had to remodel my process, using an Call Activity instead of nested subprocess.
I'll post the update once I finish, that's was the solution.

Thanks guys