Workflow cycle
A cycle iterates over an array of items returned by a trigger or action (for example, a list of devices or users), and applies conditions and actions to each item individually. Use cycles to automate bulk operations within a single workflow, such as running a backup or applying a protection plan across a set of workloads.
Cycle structure
A cycle executes the same block of steps sequentially for each item in its data source.
If the data source field displays No data found, the workflow does not yet contain a trigger or action that returns array-type data. Add one, such as Get Alerts or Get Devices, to make a data source available to the Cycle block.
You can add the following components inside a cycle:
-
Action: The operation that is performed on each item that meets the condition.
-
Cycle
Cycles can be nested. An outer cycle can contain an inner cycle, allowing iteration over multi-level data structures.
-
Condition: Evaluates each item against a set of criteria. Actions inside the cycle only run if the condition is met.
You can add a Break Cycle action inside a condition that is nested within a cycle. When that condition evaluates to true, the cycle stops immediately, and execution continues from the next block after the cycle.
When cycles are nested, you can specify which cycle level to break:
-
Break Cycle (current): Stops the innermost (current) cycle only. The outer cycle continues.
-
Break Cycle (outer): Stops the outer cycle and all cycles nested within it.
-
-
While: A global exit condition for the cycle. When this evaluates to 'false', the cycle stops, even if there are remaining items to process. Use this condition to limit the number of items that are processed, for example, by tracking a counter variable.
Viewing cycle results in execution history
When a workflow that contains a cycle is executed, the Execution history tab shows itemized results for each loop iteration. For each item that is processed, you can view the item name (for example, workload name or UUID), the status (success, failure, or skipped), the actions that are performed, and their results.
You can sort the results by item name or status, and filter by status. If you need to inspect a specific iteration, select the item from the dropdown in the execution history to view all conditions and actions that are performed for that particular item.
For more information about viewing execution history, see Viewing workflow execution history.