Skip to main content

Sending Signals to Workflows

You can manage and automate workflows by sending signals to pause, resume, terminate, restart, rerun workflows, and more. Using Conductor SDKs or APIs, you can integrate and programmatically control workflows during production and in case of failure.

Pause workflow

You can pause a workflow to wait for external signals.

Use the Pause Workflow API on a running workflow.

Endpoint: PUT /api/workflow/{workflowId}/pause

Resume workflow

Once an external signal is received, you can resume the paused workflow.

Use the Resume Workflow API on a paused workflow.

Endpoint: PUT /api/workflow/{workflowId}/resume

Restart workflow

If a workflow execution fails for any reason and enters a terminal state, you can restart it from the beginning. There are two options for restarting workflows:

  • Restart with Current Definitions—Restart using the same workflow definition that was referenced in the initial execution. This is useful if the workflow definition has changed and the original definition needs to be retained.
  • Restart with Latest Definitions—Restart using the latest workflow definition and version. If you’ve changed the definition, you can use this option to rerun the execution with the latest version.
note

When restarting workflows, the same inputs will be used. To use different workflow inputs, rerun the workflow instead.

Use the Restart Workflow API on a terminal workflow to restart the workflow from the beginning with the same input.

Endpoint: POST /api/workflow/{workflowId}/restart

Rerun workflow

You can rerun a terminal workflow from the start if you need to change the workflow inputs, correlation ID, or task-to-domain mapping. The workflow ID from the original run will be retained.

Use the Rerun Workflow API to rerun the workflow from the beginning with updated inputs.

Endpoint: POST /api/workflow/{workflowId}/rerun

Rerun workflow from task

In certain cases, you may wish to rerun an ongoing or terminal workflow from a specific task instead.

Use the Rerun Workflow API to rerun the workflow from a specific task, with the option to provide updated task inputs.

Endpoint: POST /api/workflow/{workflowId}/rerun

Retry from failed task

If the workflow fails, you can retry it from its last failed task.

Use the Retry Failed Workflow API to retry the workflow from its last failed task.

Endpoint: POST /api/workflow/{workflowId}/retry

Update task status

In some cases, you may need to update the task status in an ongoing workflow with a signal, such as updating the status of a signal-type Wait task.

Use the Update Task Status in Workflow API to update the task status to one of the following options:

  • FAILED
  • FAILED_WITH_TERMINAL_ERROR
  • COMPLETED

You can also provide the task output in the request body.

Endpoint: POST /api/tasks/{workflowId}/{taskRefName}/{status}

Terminate workflow

In some cases, you may need to terminate the workflow with a signal. For example, if a user terminates an ongoing indexing process.

Use the Terminate Workflow API to terminate an ongoing workflow.

Endpoint: DELETE /api/workflow/{workflowId}