I am going to show one example of how to use a signal to start a process, but there a several ways to use the signal event.
You may choose to send a REST signal instead of using the REST call when there are several processes you wish to start at the same time or you don't know the ID of the process you want to start.
The JSON of the request mapping should be similar to:
{
"signalName":"mysignal",
"tenantId":"tenant_1",
"async":"false",
"variables":
[
{
"name":"varFromSignal",
"value":"This is a string"
}
]
}
The values are:
signalName - The name of the signal you are throwing and catching. You will need to define this in the process that you want to catch the signal.
tenantId - The ID of the tenant in which to throw the signal. In a non-MT environment, the tenantId will be "tenant_1"
async - If you want the throw to be executed asynchronously
variables - Any variables you want to pass to catch events. You will need to define these in the catch process.
6. Request header:
Header name: Content-Type
Header value: application/json
7. Endpoint:
HTTP method: POST
Base endpoint: http://<aps_host>:<aps_port>
Rest URL: /activiti-app/api/runtime/signals?tenantId=<your_tenant_id>
REST configuration is complete
You can find sample apps and process on my Github
The example files may not work with the community edition of Activiti, but the concepts are the same.
https://www.activiti.org/5.x/userguide/#_signal_event_received