Loop Exit

The Loop Exit Node is equivalent to the break; statement in C#. When this Node is invoked, execution jumps to the Finished execution output of the Loop Node with the same Group. If the Error property is set to true, this Node will return execution to the Error execution output of the Loop Node.

Revision History

1.2.1.0 The Group property is now scoped to the Workflow instance.

Properties

Group

Type: String Input
A group to identify a loop. This must be the same as the Group of the Loop Node that must be stopped.

Error

Type: Boolean Input
If this is checked, it will return execution to the Error output of the linked Loop Node.

Message

Type: String Input
If the Error is true, this message will be included in the exception that is thrown.

Using the Node

  1. Add a Loop Node to your Workflow.
  2. On the Loop Node, set Group to a unique name and configure out loop properties as desired.
  3. (Optional) Design any sub‑workflows serially, if needed.
  4. Add a Loop Exit node later in the same workflow, or in a seriall sub‑workflow.
  5. On the Loop Exit Node, enter the same Group name so that your Loop knows where to exit.
  6. Ensure both Loop and Loop Exit are on the same version, latest v1.2.1.0.
  • In the Group property, enter the exact name that you provided in the Group property of the corresponding Loop Node you want to control.

  • Set the Error property to True if you want to return execution to the Error execution output of the Loop Node. You can provide an optional Message that will be surfaced in the error log.

Remarks

This Node provides a way to create conditional exit points for a repeating process. For example, you could use a Loop Exit to stop iterating through a list of records as soon as a specific record is found.

Parallel Sub-Workflows

As of Loop v1.2.1.0 and Loop Exit v1.2.1.0, the Group property only applies within the single workflow instance that is currently running, including any sub‑workflows you call one after the other (serially). Each branch of a parallel sub‑workflow runs in its own isolated instance, so a Loop Exit in one branch cannot appropriately communicate with its outer Loop simultaneously that other branches may. In other words, you cannot pair a Loop with a Loop Exit that lives in a parallel sub‑workflow.

Aligned/Matching Versions

Prior to Loop v1.2.1.0 and Loop Exit v1.2.1.0, the Group property automatically applied to all workflows on the same Site, which could lead to unintended cross‑workflow exits. To avoid confusion and unexpected behaviour, always align Loop and Loop Exit versions - and use identical Group names.

See Also

Loop