Sending an Event to a Process
The /SendEvent API from the API explorer is used to send an event to either a specific process instance, which must exist at the time when the API is called by using the instanceId
attribute, or through correlation data, using the correlationData
attribute. You should supply either one of these attributes, not both.
A data payload can be sent to the process to update its data fields using the data
attribute, for which the format is similar to creating any instance.
If you are using correlation data, the instance you are targeting does not need to exist at the time you call the API, but if multiple correlation data fields are used, the order in which they are specified in the API must match the order in which they are specified on the task in TIBCO Business Studio - BPM Edition.
Example:
Endpoint | http://ace-nightly-test.emea.tibco.com/bpm/process/v1/sendEvent |
Request Payload | { "instanceId": "p:0a205n", "taskName": "ReceiveTask2", "data": "{\"BooleanCorrelationField\":\"true\",\"TextCorrelationField\":\"abc\",\"DateCorrelationField\":\"2022-12-15\",\"DecimalCorrelationField\":\"11.5\",\"IntegerCorrelationField\":\"16783\",\"TimeCorrelationField\":\"13:30:00\",\"TimeoneCorrelationField\":\"2022-12-18T05:20:00.000Z\",\"URICorrelationField\":\"http://ace=nightly-test\"}" } or { "correlationData": { "BooleanCorrelationField": true, "TextCorrelationField": "abc" }, "taskName": "ReceiveTask2", "data": "{\"BooleanCorrelationField\":\"true\",\"TextCorrelationField\":\"abc\",\"DateCorrelationField\":\"2022-12-15\",\"DecimalCorrelationField\":\"11.5\",\"IntegerCorrelationField\":\"16783\",\"TimeCorrelationField\":\"13:30:00\",\"TimeoneCorrelationField\":\"2022-12-18T05:20:00.000Z\",\"URICorrelationField\":\"http://ace=nightly-test\"}" } |
Response |
Not applicable |