Signal Catch Event (Intermediate) is not resumed from runtimeservice

Hello;

I need help in SignaI Catch Event (Intermediate), the workflow is reaching at it and stop (and this is correct and what I need), but I am trying to trigger it (I need the workflow to resume) using the below code (and I am running this code from java class that is called by user task):

ProcessEngines.getDefaultProcessEngine().getRuntimeService().signalEventReceived("SignalMobileDisc");
Note: SignalMobileDisc is the name of the signal and not the id.

But it is not resuming, but I am able to make it resume by using signalthrowingevent. So why I can not resume it using the above code?
By the way, I configured the signal to be global signal so it should be able to receive from other process using the above code. But why nothing is happen?

I tried to resume it using the below code:

ProcessEngines.getDefaultProcessEngine().getRuntimeService().signalEventReceived("SignalMobileDisc", "307105");

Where 317509 is the execution id, but it was giving me the following:
Execution 317509 has not subscribed to a signal event with name 'SignalMobileDisc'

It is important really to be able to resume the Signal Catch Event (intermediate) from javacode because this will help a lot.

Do I have miss understanding in something?

Regards
Bilal

Hello;

Could be the reason for the problem that I am using ProcessEngines.getDefaultProcessEngine().getRuntimeService().signalEventReceived("SignalMobileDisc"); within process and it should be only used for integration (from outside software that call java class which will run this code)?

In other words: this to be used by API and not from process?

Regards
Bilal

Hi Bilal,

I would say that process instance is not subscribed to the signal. There are plenty of tests which are catching and throwing signals in the flowable source. e.g https://github.com/flowable/flowable-engine/blob/a8a0fc69fb1e0bcacfa8644cb2bcffd8977a5b59/modules/flowable-engine/src/test/java/org/flowable/engine/test/bpmn/event/signal/SignalEventTest.java#L43
You can check whether process instance is subscribed to the signal.
I do not see any problem to call runtime service from the running process. (You have to be aware of transaction boundaries in that case).
There is also message throwing event process step which throws signal you need.

Regards
Martin

Hello @martin.grofcik
Thank you for your kindly reply.
The process instance is subscribed to the signal.
The problem is happening if the workflow contains user task, then I can not trigger the Intermediate signal catch event by using ProcessEngines.getDefaultProcessEngine().getRuntimeService().signalEventReceived("SignalMobileDisc");

If the workflow is not containing user task, then it i possible to use the above code.
One more thing: if I need to trigger the Intermediate Signal Catch Event by using Intermediate Throwing Event, then it is working even if the workflow is containing user task.

If this is not the case, please let me know.

Regards
Bilal

Hi Bilal,

Could you create simple jUnit test for this case please?
https://www.flowable.org/docs/userguide/index.html#mavenArchetypes

Regards
Martin

I am facing the same problem using Flowable 6.5.0

I am throwing the event signal by code, but it is not catch by the boundary catch event attached into an user task.

Can you share your process xml + which method you’re calling (signalEventReceived?)

Sorry, but I gave up on that approach, and I created a different flow to achieve what I needed.
I don’t have the sample process anymore.