Skip to main content
All CollectionsBuild AutomationsOperators
Wait Operator: Precisely Pause Workflow Progress with Torq
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 this week

Leverage the Wait operator to introduce timed delays, ensuring precise control over workflow execution and synchronization in Torq. Torq's 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.

How it Works

  • 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.

  • You can choose between two parameters:

    • Duration: Waits for a specified amount of seconds, minutes, hours, or days.

    • Until Date: Specifies a date and time in ISO 8601 extended format with a timezone offset.

Resume Execution

  • The Resume Execution step can be found in the step library, either by searching or looking under the Torq category.

  • The step tells a specific Wait operator to stop waiting for a given/specific execution.

  • Reference the Wait operator you're targeting by its step name, using _ underscores in place of spaces within the name.

  • If the workflow has multiple steps with the same name, all of those steps will resume. Therefore, it is important to use unique names for each operator.

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

    • Inside a Nested Workflow (within the parent workflow)

    • 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 in which the workflow should be resumed.

Resume Execution: Use Cases

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

Resuming After an Approval Process

Use the Resume Execution step to resume a workflow once the necessary approval is received.

Example: Approval with Multiple Stakeholders

  • A security policy change requires approval from multiple stakeholders.

  • The parent workflow contains a Nested Workflow with a loop that sends the approval request to the necessary stakeholders and a Wait operator that pauses the workflow for a specified duration.

  • The Nested Workflow also includes a Resume Execution step, which references the Wait operator in the parent workflow by name.

  • When the Resume Execution step runs, it instructs the parent workflow to stop waiting and send a follow-up message to the original requester.

Resuming Threat Intelligence Processing

Use the Resume Execution step to resume execution 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 as soon as enough threat intelligence is gathered from the first source.

Did this answer your question?