Signal subscription is not canceled for Event Based Gateway


I’m fairly new to Camunda. I am working on a Camunda Platform 7 BPMN diagram.

I have an event based gateway with a timer and a signal intermediate catch event subscriptions.

This is similar to the example given in the documentation.

I am trying to trigger the signal after the timer event has executed, the subscriber of which should have unsubscribed by now.

To create this scenario, I put a sleep() command in the ‘Request Timeout’ task and before the process has terminated, I trigger the signal using RuntimeService.createSignalEvent() or RuntimeService.signalEventReceived() methods.

I query with the processInstanceId to get the executionId for this particular signal event.

And subsequently, both the ‘Request Timeout’ and ‘Execute Task’ service tasks are getting executed.

Would like some help to understand what I’m missing and how exactly Event Based Gateways work. Because this is all I could figure out from the docs and forums.

Hi @swaraj,

your observation could be a side effect of the transaction handling in service tasks.

Could please try your model checking Asynchronous before on both service tasks?

This should remove the token from the gateway once the timer has fired and process reaches your Request Timeout task.

You can find more details about transaction handling here: Transactions in Processes |

Hope this helps, Ingo


That solves it! Thanks for pin-pointing this resource, it’s extremely useful.