I have a process using parallel gateway. After calling comfimOK I want to terminate the process running parallel with this process that requires user task userConfirm. I’m trying to use signal event to notify that process to kill it, but the other process cannot get the signal. Are there any other ways to kill the parallel process using event based ? Or should I implement it using Java code ? I’d really appreciate your help. Thanks.
Here is my design.
Hi @Sonnpm197 ,
Welcome to the Camunda forum
You can solve this by adding interrupting boundary events like conditional/escalation events.
Deploy this bpmn file and verify: diagram_1.bpmn (11.6 KB)
In the “user confirm” activity when the user cancels (confirmed= true), boundary event will be get activated and the tokens in the parallel execution flow will be get terminated.
My 1st thought was handling the event on the other parallel activity itself. Is it true that activities running parallel cannot receive event from the other thread, like my example using parallel gateway ? correct me if I was wrong
@Sonnpm197 signal event is to broadcast to all active handlers.
You can use the terminate end event to kill all other reamining tokens: https://docs.camunda.org/manual/7.14/reference/bpmn20/events/terminate-event/
Hope this helps, Ingo
Signal-Events might not be what you want to use here.
Since signals are global, all process instances that are currently waiting for this signal will react to this.
Which means, that you would cancel the subprocesses of all other instances too…