How to terminate a process running in parallel using event?

Hi all.
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.

1 Like

Hi @Sonnpm197 ,

Welcome to the Camunda forum :partying_face:

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.

Hi @Sonnpm197,

You can use the terminate end event to kill all other reamining tokens:

Hope this helps, Ingo

1 Like

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…

1 Like