---
sourceDocument: Brazil ServiceNow AI Platform Capabilities
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/servicenow-platform

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil ServiceNow AI Platform Capabilities

ft:clusterId :

    - platcap

bundleId :

    - platcap

workflow :

    - Platform


---

# Wait for condition workflow activity

# Wait for condition workflow activity {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Wait for condition workflow activity

The Wait for condition workflow activity allows a workflow to pause execution at a specific point until the current record meets a defined condition.
The workflow continuously evaluates the condition whenever the record is updated, enabling it to wait indefinitely for external events such as record changes before proceeding.
This activity is distinct from timer-based pauses, which introduce fixed time delays.
Show full answer Show less  
It is important to use this activity only to wait for events triggered by external changes to the record, not for internal changes made by the workflow itself. For cases where the workflow sets a value and must detect that change, inserting a short timer (e.g., one second) is recommended to ensure the workflow recognizes the update.

## Key Features

* **Condition Evaluation:** The workflow pauses until all specified conditions---defined either via a condition builder or a script---evaluate to true for the current record.
* **Scripted Results:** Within the activity's script field, the workflow designer can assign a result value (activity.result). The workflow advances when this result becomes true.
* **Timeout Capability:** An optional timeout can be enabled to limit how long the workflow waits for the condition. If the timeout is reached before the condition is met, the workflow skips this activity and continues. Duration and scheduling options allow precise control over timeout behavior.
* **User Context:** Condition activities execute as the user whose actions triggered the condition, ensuring appropriate permissions and audit trails.

## Input Variables

Key input variables control the activity's behavior:

* **Condition:** Defines when the workflow should resume based on the record's state.
* **Condition script:** Allows custom scripting to determine when to resume, by setting an answer variable to true.
* **Enable Timeout:** Activates a maximum wait period to avoid indefinite pauses.
* **Duration:** Specifies the length of time to wait before timing out, configurable in hours, minutes, and seconds.
* **Schedule:** (Optional) Calculates timeout duration according to a defined work schedule.

## Activity States

The activity progresses through defined states during its lifecycle:

* **Executing:** The workflow engine initiates the activity's execution logic.
* **Waiting:** The workflow pauses and ignores the activity until the awaited condition event occurs.
* **Finished:** The activity completes successfully, and the workflow continues based on the result.
* **Cancelled:** The activity or the containing workflow is canceled.
* **Error:** An error occurred during execution; logs should be reviewed for details.

## Practical Implications for ServiceNow Customers

Using the Wait for condition activity enables you to design workflows that respond dynamically to record updates, ensuring processes only proceed when specific criteria are met. This is ideal for scenarios requiring external input or approvals before continuing. Employing the timeout feature helps safeguard against indefinite waits, maintaining workflow efficiency. Remember to avoid waiting on workflow-driven changes directly and use timers where necessary to detect such changes.  
The Wait for condition activity causes the workflow to wait at this activity until the current record matches the specified condition. {#r_WaitForCondition__wf-wait-for-activity-shortdesc}
The workflow evaluates the Wait for condition activity each time the
current record is updated. Use this activity to pause a workflow indefinitely until a
particular criteria is met by a record update. To pause a workflow for a timed duration see
[Timer workflow activities](https://servicenow-prod.fluidtopics.net/9iKaqu5Lbpicizp39aDntQ "Timer activities pause workflows for set periods of time.").  
For workflow to consider the condition met, all conditions specified -- whether in the builder or in a script -- must be true.  
Note:  
A Wait for condition activity should only be used to wait for an external event such as a record update, and not one from a workflow setting a value. If you have a workflow setting a value and want to wait for that same field to be seen as 'changed,' try inserting a one-second timer.

## Results

The workflow designer can assign a result value using `activity.result` from
within a script field of the activity. The activity transitions when the result value is
true.

## Input variables

The following variables determine the behavior of the activity.  
Note:  
Condition activities run as the user whose actions match the conditions the workflow was waiting for and advances the workflow.
{#r_WaitForCondition__table_uml_1qt_jp__entry__2}

| Field | Description |
|-|-|
| Condition | The workflow is paused at this activity until this condition matches the current record. |
| Condition script | If specified, the workflow is paused at this activity until this script sets the <var class="keyword varname">answer</var> variable to true. |
| Enable Timeout | Option to limit the amount of time that the workflow waits for the activity to be completed before continuing. Note: Use the Enable timeout option to prevent this activity from continuing to run. If the condition to continue is never met, a timeout value specifies when the system skips the Wait for Condition activity and goes to the next item in the workflow. You must set a Duration value to enable a timeout. You can also select a Schedule if you want to compute the duration end date based on a specific work schedule. |
| Duration | Amount of time that the workflow waits before continuing when the Enable timeout option is selected. Enter the time to wait in hours, minutes, and seconds. If you leave this field empty, the workflow does not wait. |
[Table 1. Wait for condition activity input variables]

{#r_WaitForCondition__table_uml_1qt_jp}

## States

The activity state tells the workflow engine what to do with the activity.{#r_WaitForCondition__table_wvy_pqt_jp__entry__2}

| State | Description |
|-|-|
| Executing | The workflow engine knows to start the onExecute function of the activity. |
| Waiting | The workflow engine ignores the activity until a specific event to restart the activity is fired. |
| Finished | The activity finished running. See the result value for the outcome of the activity. |
| Cancelled | This activity, or the workflow that contains this activty, was canceled. |
| Error | A JavaScript error occurred. Review the logs for error details. |
[Table 2. Wait for condition activity states]

{#r_WaitForCondition__table_wvy_pqt_jp}

