07-19-2018 03:23 AM
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
07-25-2018 07:11 AM
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);
07-25-2018 05:27 AM
Just an update as i am unable to get the response but the functionality is working fine with the /runtime/Signals Api.
07-25-2018 07:11 AM
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);
Explore our Alfresco products with the links below. Use labels to filter content by product module.