Skip to main content

Event

The Event task is used to publish events into eventing systems. It supports various eventing models, including AMQP, Amazon MSK, AWS SQS, Azure Service Bus, Confluent Kafka, Apache Kafka, NATS Messaging, GCP Pub/Sub, and IBM MQ.

An Event task publishes a message to an event queue or topic. The specific eventing system used depends on the configured sink. The sink parameter defines the message broker type, integration name, and queue/topic name. The task execution payload is sent to this sink, and Conductor automatically appends additional system input parameters to the payload.

note

Prerequisite - Before configuring the Event task, ensure that the required message broker is integrated with Orkes Conductor, and then create a corresponding event handle. Configuration parameters vary with each eventing system. Refer to the corresponding documentation for detailed integration steps.

Task configuration

Configure these parameters for the Event task.

ParameterDescriptionRequired/Optional
sinkThe event queue sink in the format: “Type : Config Name : Queue/Topic Name”.

Where,
  • Type—The message broker type where the payload is being sent. Supported types:
    • amqp
    • sqs
    • azure
    • kafka
    • nats
    • gcppubsub
    • 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.
Required.
inputParametersThe input parameters for the Event task, which can be passed as a variable or a fixed value. These parameters determine the payload sent to the event sink during task execution.Optional.

Additional system inputs to payload​

Conductor automatically adds the following parameters to the payload. Ensure that these fields are not 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.

Example

Given the following task definition:

{
"name": "event_task",
"taskReferenceName": "event_task_ref",
"type": "EVENT",
"sink": "kafka:integration-name:topic-name",
"inputParameters": {
"myKey": "myValue",
"myNumber": 100
}
}

The execution will produce the following input parameters:

    {
"myKey": "myValue",
"myNumber": 100,
"workflowInstanceId" : "967b19ae-10d1-4b23-b0e7-ae324524dac0",
"workflowType" : "my-workflow-name",
"workflowVersion" : "1",
"correlationId" : "fbdcafd2-69c7-4b75-8dd1-653e33d48746",
}

Task definition

This is the JSON schema for an Event task definition.

  {
"name": "event",
"taskReferenceName": "event_ref",
"type": "EVENT",
"sink": "messaging-type:integration-name:queue-or-topic-name",
"inputParameters": {}
}

Task output

The task output mirrors the payload sent during execution, including system-appended parameters.

Adding an Event task in UI

To add an Event task:

  1. In your workflow, select the (+) icon and add an Event task.
  2. In Sink, select the required integration and append the topic/queue name. Failure to do so may result in execution errors, as the payload won't have a valid destination.
  3. (Optional) Add any additional input parameters.

Adding event task