# Boundary signal event on subprocess not caught

**URL:** <https://forum.flowable.org/t/boundary-signal-event-on-subprocess-not-caught/2414>\
**Category:** Flowable Engine\
**Created:** [August 20, 2018, 4:23am UTC](https://forum.flowable.org/t/boundary-signal-event-on-subprocess-not-caught/2414 "2018-08-20T04:23:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shanloid](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/shanloid/32/692_2.png) [@shanloid](https://forum.flowable.org/u/shanloid)\
**Post date:** [August 20, 2018, 4:23am UTC](https://forum.flowable.org/t/boundary-signal-event-on-subprocess-not-caught/2414/1 "2018-08-20T04:23:57Z")

</div>

Hi,

I’m trying to test catching signals on the boundary of a subprocess (as a mechanism for breaking out of the subprocess). My test process looks like:

![Screenshot%20from%202018-08-20%2014-11-01](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex035/uploads/flowable/original/1X/ae83e031cf7687df76c314eb5d7ec7b2f6b0c210.png)

The signal definition is scoped to “processInstance”, as I want to target a specific process instance. When I send the signal via the runtimeService, I use the overloaded signalEventReceived(signalName, executionId), with the executionId being the process instance ID.

I get the following error: _Execution ‘7505’ has not subscribed to a signal event with name ‘signal-foo’._

Is this telling me that the process instance itself has no subscription to the signal, because it is the subprocess that has the subscription? Would this work if instead I supplied the ID of the subprocess execution to signalEventReceived? The problem with this is that I don’t have access to the subprocess ID in my particular use case. All I have is the overall process ID. My hope was that sending the signal to a specific process ID would end up delivering the signal to any catching signals within the scope of that process (ie including sub processes), but this seems not to be the case.

Any idea how I can fix this to make it work? All I really want to do is fire some sort of signal or message that lets me short-circuit out of a subprocess that is sitting in a wait state.

Thanks,  
Shannon

---

<div class="post-metadata">

**Author:** ![filiphr](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/filiphr/32/315_2.png) [@filiphr](https://forum.flowable.org/u/filiphr)\
**Post date:** [August 21, 2018, 7:26pm UTC](https://forum.flowable.org/t/boundary-signal-event-on-subprocess-not-caught/2414/2 "2018-08-21T19:26:08Z")

</div>

Hey Shannon,

> Is this telling me that the process instance itself has no subscription to the signal, because it is the subprocess that has the subscription?

Yes you are completely right, the execution that is subscribed to the signal is the subprocess and not the process instance itself.

> Would this work if instead I supplied the ID of the subprocess execution to signalEventReceived?

Yes it would work.

> The problem with this is that I don’t have access to the subprocess ID in my particular use case. All I have is the overall process ID.

This is something that could easily be added through a PR. For example a method in `RuntimeService` that would look like `signalEventReceivedToProcessInstance(String processInstanceId)` or add a builder for the signalling in the `RuntimeService` that would allow you to do this over the API.

In theory you can also achieve what you need (only having the `processInstanceId`) by using the internal API and the `EventSubscriptionEntityManager`. However, keep in mind that this is an internal API.

Cheers,  
Filip
