Skip to main content

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​

AttributeDescription
sinkSpecifies the event queue sink, which is of the format:

Type : Config Name : Queue/Topic Name
where,
  • Type - The type is message broker type where payload is being sent. These are the supporters types:
    • AMQP - amqp
    • AWS SQS - sqs
    • Azure Service Bus - azure
    • Apache Kafka - kafka
    • NATS Messaging - nats
    • GCP Pub Sub - gcppubsub
    • IBM MQ - ibm_mq
  • Config Name - The integration name added to the cluster.
  • Queue/Topic Name - The name of the queue or topic where the payload is being sent.
If you are using Conductor UI, the UI drop-down lists available message broker integration in the Conductor cluster. Select the required integration and append the topic/queue name. For example, the drop-down lists the sink for the above example as kafka_confluent:John-Test. Edit the sink to append the topic name, making it kafka_confluent:John-Test:topic-name.
inputParametersProvide the required input parameters so the task execution will be sent as the payload to the event sink.
optionalEnabling 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



  1. Add task type Event.
  2. Select the sink type from the integrations added to the cluster.
  3. Add the topic name along with the sink.
  4. Provide the required input parameters.

Adding event task