Skip to main content

Worker Task (Simple)

A Worker task (also known as a Simple task) is used to run custom logic implemented in any language. The custom logic can be deployed anywhere and the Worker task requires an external worker for polling.

For a full guide on how to use workers, refer to Using Workers.

Task parameters

To configure the Worker task, set its inputParameters as needed for your worker code. The inputs can be passed as a variable.

Task configuration

This is the task configuration for a Worker task.

{
"name": "task_name",
"taskReferenceName": "task_name_ref",
"inputParameters": {},
"type": "SIMPLE"
}

Task output

The Worker task will return the output defined in your worker code.

Adding a Worker task in UI

Before adding a Worker task to a workflow, you should complete the following:

  • Create a worker to run a custom task.
  • Define the task in Conductor using Orkes Platform or API.

For a full guide on how to use workers, refer to Using Workers.

To add a Worker task:

  1. In your workflow, select the (+) icon to add a new task. There are two ways to add a worker task:
    • Search for your task using its task name (created previously) and select to add it to the workflow.
    • Add a Worker Task (Simple) and enter the task name in Task Definition. This creates a new task definition.
  2. Configure the task, such as its inputs, caching, schema validation, and optionality.

Sample worker code snippets are available in the UI for reference.

Examples

Find an example of how to add and run a Worker task in our Getting Started guide.