Skip to main content

Wait Operator: Precisely Pause Workflow Progress with Torq

Learn how to pause and resume your workflows with the Wait operator to control timing and improve execution flow in Torq

Updated over a week ago

Leverage the Wait operator to introduce timed delays, ensuring precise control over workflow execution and synchronization. The Wait operator allows you to pause a workflow for a designated duration. The workflow will not proceed until the specified time has passed or until the selected date and time.

When a workflow executes a Wait operator, it moves to the On hold status. While on hold, it does not count toward your workflow execution concurrency quota.

How to use

  1. Add the operator: Drag and drop the Wait operator into the part of the workflow you want to pause.

    • Any steps after the Wait operator will not execute until the workflow resumes.

  2. Select the Wait type parameter: Choose one of the following options to define how the Wait behaves:

    • Duration: The wait time is specified in seconds, minutes, hours, or days.

    • Until Date: Waits until a specified date and time, given in ISO 8601 extended format with a timezone offset (for example, 2025-10-31 17:30:00.000 +3.00).

The maximum wait time for both Duration and Until date is 31 days.

Resume execution

The Resume Execution step tells a specific Wait operator to stop waiting, for a given execution. This step is helpful when you need to wait for a third party to complete an action or for input that has an unknown turnaround time. It allows the workflow to resume as soon as the required condition is met, without waiting for the defined Wait type parameter to be fulfilled.

The Resume Execution step is found in the step library by searching or looking under the Torq Steps category.

Reference the Wait operator you're targeting by using either its pretty name (eg, "Wait for 5 mins"), or its internal name (eg, "wait_for_5_mins"). If the workflow has multiple steps with the same name, all those steps will resume. Use unique names for each use of the operator.

The Resume Execution step cannot be placed after its referenced Wait operator. It must be placed either:

  • inside a separate workflow, or

  • in an asynchronous nested workflow (where the parent workflow waits for output from the nested workflow before continuing), or

  • parallel to the Wait operator, either alone or within a Loop.

    • As a best practice, an If or Switch operator should be placed before the Resume Execution step to specify the scenario where the workflow should be resumed.

Use case: Resume execution

The following examples demonstrate key use cases for the Resume Execution step.

Resume threat intelligence processing

Use the Resume Execution step to resume a workflow as soon as enough data is received to take action.

Example: Enriching threat intelligence

A workflow enriches threat data by querying multiple sources.

The workflow waits until the first source provides enough context for further action. The Resume Execution step resumes the workflow once enough threat intelligence is gathered from the first source.

Resume execution with the Transferred body parameter

Transferred body is an optional parameter in the Resume Execution Step. It allows the step to inject data into the context of the Wait operator. This capability is powerful in transferring data to the main workflow so that it can be used in decision-making later in the execution.

Example: Resume execution with data transfer

See this in action in this short demo on Torq's Community Tips and Tricks page.

A workflow sends a question to a user via Slack, and the execution then waits for a response.

A separate workflow is initiated when the user responds to the Slack message. It uses the Resume execution Step to allow the main workflow to resume as soon as the Slack response is received. The Resume execution Step takes an input of the execution ID and the specific Step name, so that the correct Wait step is resumed. In this case, the step in the main workflow is called Slack response, and becomes the input into the Resume execution step in the second workflow.

Use the Transferred body parameter to send the context data from the Slack message to the Wait operator in the main workflow.

Did this answer your question?