Skip to main content

Creating Workflow Definition

A workflow is a collection of tasks and operators that define the sequence and execution of tasks. This API allows you to create workflow definitions in Orkes Conductor.

Input Payload

You can configure workflow definition directly via UI and using API. The workflow definition includes the following parameters:

AttributeDescription
nameProvide a unique name for the workflow. This field is mandatory.
descriptionInclude a description that explains the purpose of the workflow. This field is optional.
versionSpecify the version number of the workflow to track changes. The default value is 0.
tasksDefine the tasks to be executed within the workflow. For operator or system tasks, the Conductor server manages the execution. User-defined or worker tasks require a worker running outside the Conductor environment.
inputParametersSpecify the input values for the workflow.
outputParametersSpecify the output values of the workflow.
schemaVersionIndicates the version number of the workflow definition schema.
restartableSet to true to allow the workflow to be restarted after completion. Set to false if restarting could impact functionality.
workflowStatusListenerEnabledSet to true to enable workflow status change events to sink if configured. For more information, refer to the documentation on enabling CDC.
ownerEmailThis field is auto-populated with the user’s email address.
timeoutSecondsSpecifies the time (in seconds) after which the workflow is marked as TIMED_OUT if it remains in the IN_PROGRESS status. A value of 0 indicates no timeout.
timeoutPolicyDefines the condition under which the workflow should time out. Possible values are:
  • TIME_OUT_WF - The workflow status is set to TIMEOUT, and the workflow is terminated.
  • ALERT_ONLY - Registers a counter.
failureWorkflowProvide the name of a workflow to trigger upon failure of the current workflow execution.

API Endpoint

POST /api/metadata/workflow

Client SDK Methods

void OrkesMetadataClient.registerWorkflowDef(WorkflowDef workflowDef) throws ApiException