Open topic with navigation

TIBCO® BPM Enterprise 5.5.0

# 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 Method:
    Post
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

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO® BPM Enterprise

Copyright © 2015-2024. Cloud Software Group, Inc. All Rights Reserved.