Break Loop activity

During run time, when a Break Loop activity is processed, the processing flow breaks out of the current looping activity and continues to the next activity in the orchestration

About this task

The Break Loop activity can only be used in any of the following looping activities: For Each, Split, and While Loop, as shown in the following examples.

To use a Break activity:

Procedure
  1. Open the Activities tab and the Logic folder.
  2. Drag a For Each, Split, or While Loop activity onto the orchestration.
  3. Drop the Break Loop activity into the looping activity, as shown in the following example:
    • To break out of a loop when a condition is true, see Example 1.
    • To break out of a loop after a single iteration, see Example 2.

Example 1 - Break out of a loop when a condition is true

  1. Drag an If..Then activity into the looping activity you set up, as shown in the above figure.
  2. Drag an action activity (for example: the Insert Rows activity) onto the empty placeholder to the right of the Else node.
  3. Configure the action activity.
  4. Click the If node and enter a condition in the Expression Builder.
  5. Drag a Break Loop activity onto the empty placeholder to the right of the If node.
At run time:
  • If the condition in the If activity evaluates to true, the Break Loop exits out of the looping activity.
  • If the condition in the If activity evaluates to false, the Else branch is started and the action activity (for example: the Insert Rows activity) is run.

Example 2 - Break out of a loop after a single iteration runs

  1. Drag an action activity (for example, the Insert Rows activity) onto the empty placeholder inside of the looping activity you selected.
  2. Configure the action activity.
  3. Drag a Break Loop activity onto the empty placeholder inside of the looping activity.
At run time:
  • The action activity (for example: the Insert Rows activity) runs only once before the Break Loop exits out of the looping activity.