Hi,
I have two process definations "SignalEvent1" and "SignalEvent2" from "SignalEvent1" I am Trying to throws intermediate throwing signal event with signal "SubIncidentAdd" and calling this rest api call with following payload
runtime/signals
{
"signalName": "SubIncidentAdd",
"tenantId" : "1",
"async": false,
"variables": [
{"name": "test", "value": "catch the event "}
]
}
And in porcess defination "SignalEvent2" i have intermedetiate catching signal event which will catch this event and continue the execution with script task which will just print the variable "test" value.
Please note that i have started both the process definations before using rest api call
I am getting 204 status while trying the above rest api using postman
Please find the attchment of App where i have included both the process definations
Solved! Go to Solution.
Another Alternate method to use is we can write a listener and directly call the following runtime service method
/**
* Notifies the process engine that a signal event of name 'signalName' has been received. This method delivers the signal to a single execution, being the execution referenced by 'executionId'. The
* waiting execution is notified synchronously.
*
* @param signalName
* the name of the signal event
* @param executionId
* the id of the execution to deliver the signal to
* @param processVariables
* a map of variables added to the execution(s)
* @throws ActivitiObjectNotFoundException
* if no such execution exists.
* @throws ActivitiException
* if the execution has not subscribed to the signal
*/
void signalEventReceived(String signalName, String executionId, Map<String, Object> processVariables);
Just an update as i am unable to get the response but the functionality is working fine with the /runtime/Signals Api.
Another Alternate method to use is we can write a listener and directly call the following runtime service method
/**
* Notifies the process engine that a signal event of name 'signalName' has been received. This method delivers the signal to a single execution, being the execution referenced by 'executionId'. The
* waiting execution is notified synchronously.
*
* @param signalName
* the name of the signal event
* @param executionId
* the id of the execution to deliver the signal to
* @param processVariables
* a map of variables added to the execution(s)
* @throws ActivitiObjectNotFoundException
* if no such execution exists.
* @throws ActivitiException
* if the execution has not subscribed to the signal
*/
void signalEventReceived(String signalName, String executionId, Map<String, Object> processVariables);
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.