Skip to main content

Using Task Input Templates​

Task input templates are default parameters included in a task definition that are applied to all instances of the task. When you use the task in a workflow, the system automatically populates the task configuration with the template values. You can override these values in the workflow using task input parameters.

Configuring task input template

Task input templates are part of a task definition, and you can create them when you define the task.

To create a task definition:

  1. Go to Definitions > Task from the left menu on your Conductor cluster.
  2. Select an existing task definition or create a new task using + Define task.
  3. Configure the required task parameters.
  4. In Task input template, select + Add parameter.
  5. Enter the template parameters as key-value pairs. Supports string, number, boolean, null, and object/array.
  6. Select Save > Confirm Save.

Task input template in task definition

// Example of a task input template in a task definition JSON
"inputTemplate": {
"someKey": "someValue"
}

Adding task input templates in workflow definitions

To include a task input template in a workflow:

  1. Go to Definitions > Workflow from the left menu on your Conductor cluster.
  2. Select an existing workflow definition or create a new one using + Define workflow.
  3. Configure the required workflow parameters.
  4. In your workflow, select the (+) icon and add a task that uses the definition you created earlier, such as a Worker task. There are two ways to add this task.
    • Select the (+) icon and search for your task using its task name (created previously) and add it.
    • Add a Worker task and search for your task name (created previously) in the Task Definition field. This will add your task definition to the workflow.

When a task definition is added to the workflow, the parameters supplied via the task input template are automatically included.

Workflow definition with task input template supplied already

If you provide the same value as an input parameter to the task, the template values get overridden by the task input parameter.

For example, a parameter someKey with the value someValue has been supplied through a task input template. If the same someKey is defined as an input parameter to the task, those values override the values from the template.

Overriding task input template parameters from Workflow definition

Use the Override All button to replace the task input parameters with the template's parameters.

note

Task input templates are only part of the task definition and will not appear in the workflow definition JSON. However, the values are passed into the workflow during execution.