Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Turnstile workflow activity

The Turnstile activity limits how many times a workflow can pass through the same point.

Use this activity to prevent infinite loops. This activity is useful alongside the Rollback To workflow activity activity.

Results

You can assign a result value using the activity.result variable from within a script field of the activity. By default, the activity script evaluates if the activity should continue to iterate or stop.

ResultDescription
ContinueThe Allowed iterations value is greater than the number of times the workflow accessed this activity.
CancelThe workflow accessed this activity more times than the Allowed iterations value.

Input variables

Input variables determine the initial behavior of the activity.

FieldDescription
Allowed iterationsNumber of times the workflow can pass through this activity before the turnstile ends the loop.

Conditions

The conditions determine which transition comes after this activity.

FieldDescription
ContinueIf the workflow has returned to this point an amount of times less than the allowed iteration.
CancelIf the workflow has returned to this point an amount of times more than the allowed iteration.

States

The activity state tells the workflow engine what to do with the activity.

StateDescription
ExecutingThe workflow engine knows to start the onExecute function of the activity.
WaitingThe workflow engine ignores the activity until a specific event to restart the activity is triggered.
FinishedThe activity finished running. See the result value for the outcome of the activity.
CancelledThis activity, or the workflow that contains this activity, was canceled.
ErrorA JavaScript error occurred. Review the logs for error details.

Parent Topic:Utility workflow activities