---
sourceDocument: Brazil Build workflows
sourceDocumentLink: https://www.servicenow.com/docs/r/build-workflows

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Build workflows

ft:clusterId :

    - crworkflow

bundleId :

    - crworkflow

workflow :

    - Creator


---

# 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 activity in ServiceNow workflows pauses the workflow execution until the current record meets a specified condition.
It continuously evaluates the condition each time the record is updated, allowing the workflow to wait indefinitely for specific criteria to be satisfied through record changes.
This activity is intended for waiting on external events such as record updates, not for internal workflow-driven field changes.
Show full answer Show less  
For scenarios requiring a timed pause, ServiceNow recommends using Timer workflow activities instead.

## Key Features

* **Condition Evaluation:** The workflow waits until all conditions (defined via the condition builder or a script) evaluate to true on the current record.
* **Script Support:** You can specify a script that sets the variable `answer` to true to define complex wait conditions.
* **Timeout Option:** To prevent indefinite waiting, the activity supports an optional timeout. If enabled, the workflow waits only up to the specified duration before moving forward.
* **Schedule-based Duration:** When using the timeout, you can base the duration calculation on a defined work schedule to align with business hours.
* **Result Handling:** Within the activity's script, the workflow designer can assign a `result` value. The workflow proceeds when this value is true.
* **User Context:** Condition evaluations run as the user whose actions triggered the matching conditions, ensuring proper security context and auditing.

## Activity States

The Wait for condition activity operates through defined states that the workflow engine manages:

* **Executing:** The activity is actively running its onExecute function.
* **Waiting:** The activity is paused, awaiting the triggering event (record update that satisfies the condition).
* **Finished:** The activity has completed after the condition was met. The outcome depends on the assigned result value.
* **Cancelled:** The activity or the entire workflow was canceled.
* **Error:** A JavaScript error occurred during execution; logs should be reviewed for details.

## Practical Considerations for ServiceNow Customers

* Use this activity to pause workflows until external record updates meet specific criteria, such as approval status changes or data updates.
* Avoid using it to wait on values set by the same workflow; instead, use a short timer to detect changes.
* Enable and configure timeout settings to prevent workflows from hanging indefinitely if conditions are never met.
* Leverage condition scripts for complex scenarios that cannot be expressed in the condition builder.
* Monitor activity state and error logs to troubleshoot issues with condition evaluation.  
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://www.servicenow.com/docs/access?context=c_TimerActivities&version=brazil&pubname=brazil-servicenow-platform&ft:locale=en-US).  
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}

