11-24-2018 02:11 PM
Hello;
Please I need help.
How I can test this code:
ProcessEngines.getDefaultProcessEngine().getRuntimeService().signalEventReceived("SignalName");
I am trying to test it within process code but it is not working (nothing is happening and the signal catch event is not triggered), does this mean that it is only possible to use it by other application (integration purposes) that will call java class that will use this code?
Regards
Bilal
12-01-2018 10:10 AM
I've tested the process you provided using latest 5.x code base and it's working as expected. Signal is received and process completes normally. Did you try on latest 5.22?
11-26-2018 12:29 AM
How are you sinding the singnal event to the process can you please attach your porcess diagram
11-27-2018 05:15 AM
I am using the below code in the User Task and Service Task that are in red rectangle in the attached image:
ProcessEngines.getDefaultProcessEngine().getRuntimeService().signalEventReceived("SignalName");
But it is not triggered.
Regards
Bilal
11-27-2018 05:57 AM
Hi Bilal,
As i can see you are trying to throw signal event from within user task and service task that can be recieved by intermediate catching event are you sure you have used the same signal name for intermediate catching event ("SignalName").
11-27-2018 10:36 AM
Hello Tabrez;
Yes the same "SignalName" and the signal name configured to be global.
Also I did one test and it worked: I used Signal Throwing Event to trigger the Intermediate Signal Catch Event and it worked using the same "SignalName" which I used it in the ProcessEngines.getDefaultProcessEngine().getRuntimeService().signalEventReceived("SignalName");
Note: I am using the signal name and not the signal id.
No error is giving but nothing is happening (the Intermediate Signal Catch Event is not triggered) and the workflow is not resume the work.
Also I tried to use signalEventReceived("SignalName", "Execution ID"); and if I gave wrong "Execution ID", then it was giving me that the "Execution ID" is not subscribed with the "Signal Name" and if I used write "Execution ID", then no error is given but the Intermediate Signal Catch Event is not triggered and nothing is happening.
And I was knowing the right Execution ID by using the signalEventSubscriptionName("SignalName") and determining the "Execution ID".
So what could be the reason for the problem that no error is given and the Intermediate Signal Catch Event is not triggered?
Regards
Bilal
11-28-2018 12:18 AM
Hi Bilal,
I would like Bassam Al-Sarori or Daisuke _ to this thread to help us around.
Thanks & Regards
Tabrez
11-28-2018 05:46 AM
Bilal Ghayad can you provide a simple runnable example or a unit test that can be used to reproduce your issue?
What version of Activiti are you using? Here are some unit tests of signal events in Activiti 6
Activiti/SignalEventTest.java at 6.x · Activiti/Activiti · GitHub
11-28-2018 11:43 AM
Thank you Bassam Al-Sarori and tabrez khan and daisuke-yoshimoto _ Daisuke _
The problem is happening when the process contains user task. Once the process is containing user task, then Intermediate Signal Catching Event is not triggered using ProcessEngines.getDefaultProcessEngine().getRuntimeService().signalEventReceived("SignalName");
But it is possible to trigger it using the Intermediate Signal Throwing Event (even if the process is containing user task).
Please note that my maven pm file is showing the following details regarding the activiti version:
<groupId>org.activiti</groupId>
<artifactId>activiti-engine</artifactId>
<version>5.16.2</version>
Kindly find as attachment for a process as example that can let you see the problem if you deploy it and tried it.
Please appreciate the kindly help.
Regards
Bilal
11-30-2018 01:07 AM
Hello tabrez khan Bassam Al-Sarori Daisuke _ daisuke-yoshimoto _
Can you please help?
And a fully thanks in advance.
Regards
Bilal
12-01-2018 10:10 AM
I've tested the process you provided using latest 5.x code base and it's working as expected. Signal is received and process completes normally. Did you try on latest 5.22?
Explore our Alfresco products with the links below. Use labels to filter content by product module.