Hello;
Regarding to Signal Boundary Event (which is related to task, like user task), to be able to catch the signal, do I need to configure listener?
Regards
Bilal
Hello;
Regarding to Signal Boundary Event (which is related to task, like user task), to be able to catch the signal, do I need to configure listener?
Regards
Bilal
Hi Bilal,
No you dont need a listener. Just treat it like a receive message event. The difference is, message events typically correlate to a single process instance. Signals are more like broadcast events and will thus ācorrelateā to all process instances waiting on that signal.
Hence your signal boundary event will interrupt the task and route the process down its flowā¦
regards
Rob
Wonderful and thank you @Webcyberrob
I will appreciate if you can help me in the SignaI Catch Event (Intermediate), the workflow is reaching at it and stop (and this is correct), but I am trying to trigger it (I need the workflow to resume) using the below (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?
Regards
Bilal
Hello @Webcyberrob
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)?
Regards
Bilal
Hi Bilal,
hereās a minimal working exampleā¦There are two processes, start the receive process first, then the send processā¦
regards
RobSignal_Demo.bpmn (5.3 KB)
Hi Bilal,
perhaps describe the behaviour or problem you are trying to solve? Im not sure what you mean by ātest itā¦ā
regards
Rob
Hello @Webcyberrob;
If we have user task or script task, and the task is associated with Java class (once the workflow reaches the task, the java class will be executed), and within this java class, we need to execute the below code:
ProcessEngines.getDefaultProcessEngine().getRuntimeService().signalEventReceived(āSignalMobileDiscā);
What I see that the event is not triggered using this code (nothing is happening).
So, maybe it is not possible to trigger the signal catch event by this code if we are trying to use it from user task or script task in the process. In other words, it is possible to use this code signalEventReceive("SignalName")
from another application which needs to talk with the workflow. This what I need to know.
Or, what could be the problem that the event is not triggered using this code?
Note: it is possible to trigger the SignalCatchEvent by using SignalThrowingEvent (PBMN elements). I tried it and it is working.
If it is not clear, I will attach pictures.
Regards
Bilal
Hello @Webcyberrob
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.
Do you have experience about this? I need someone to tell me if he is able to use this code to trigger the Intermediate Signal Catch Event in a workflow contains user task (using the code and not using the Intermediate Throwing Signal).
Can you please help for this?
Regards
Bilal