Event
An Event task is used to publish an event into one of the supported eventing systems. The supported eventing models include:
To utilize this functionality, you must first integrate the required message broker with Orkes Conductor followed by creating an event handler in Orkes Conductor. The configuration parameters vary with the eventing systems. Refer to the corresponding documentation for detailed steps on adding integration.
Definitions
An example configuration of publishing an event to Confluent Kafka:
{
"name": "event",
"taskReferenceName": "event_ref",
"type": "EVENT",
"sink": "kafka_confluent:John-Test:topic-name",
"inputParameters": {}
}
Input Parameters
Attribute | Description |
---|---|
sink | Specifies the event queue sink, which is of the format: Type : Config Name : Queue/Topic Name where,
|
inputParameters | Provide the required input parameters so the task execution will be sent as the payload to the event sink. |
optional | Enabling this option renders the task optional. The workflow continues unaffected by the task's outcome, whether it fails or remains incomplete. |
Additional System Inputs to Payload
Conductor automatically adds the following parameters to the payload. Ensure these fields aren’t present in the payload, as they will be overwritten during execution.
- workflowInstanceId - Workflow ID from where this event was sent.
- workflowType - Name of the workflow definition.
- workflowVersion - Version of the workflow definition.
- correlationId - Correlation ID of the workflow execution.
For example, given the following task definition:
{
"name": "event_task",
"taskReferenceName": "event_task_ref",
"type": "EVENT",
"sink": "kafka:external_event_name",
"inputParameters": {
"myKey": "myValue",
"myNumber": 100
}
}
The execution will produce the following output:
{
"myKey": "myValue",
"myNumber": 100,
"workflowInstanceId" : "967b19ae-10d1-4b23-b0e7-ae324524dac0",
"workflowType" : "my-workflow-name",
"workflowVersion" : "1",
"correlationId" : "fbdcafd2-69c7-4b75-8dd1-653e33d48746",
}
Output Parameters
The task produces the payload it sent as the output.
Examples
- UI
- JSON
- Add task type Event.
- Select the sink type from the integrations added to the cluster.
- Add the topic name along with the sink.
- Provide the required input parameters.
{
"name": "event",
"taskReferenceName": "event_ref",
"type": "EVENT",
"sink": "kafka_confluent:John-Test:topic-name",
"inputParameters": {}
}