Wait for condition workflow activity

The Wait for condition activity causes the workflow to wait at this activity until the current record matches the specified condition.

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.

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.
Table 1. Wait for condition activity input variables
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 answer variable to true.

States

The activity state tells the workflow engine what to do with the activity.
Table 2. Wait for condition activity states
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.