Portal Community
What it does: The Loop node reads an array from a named workflow variable and fires its body output port once for each element in the array, injecting the current item and its index into the execution context. After all items have been processed (or after an early exit via a Break node), the done port fires to continue the workflow with post-loop logic.

Key Capabilities

Business Benefits

The ability to process collections of business objects is essential to virtually every enterprise workflow. Payroll runs process each employee. Order fulfilment processes each line item. Bulk email campaigns send to each recipient. The Loop node provides a structured, reliable mechanism to iterate over these collections inside a workflow without requiring custom code or external orchestration.

By keeping iteration logic inside the workflow graph, teams gain full visibility into what happens at each step of the loop. Loop body nodes appear in workflow execution logs with their per-item context, making it straightforward to trace exactly what happened for each element — invaluable when debugging issues in bulk operations.

The materialised list approach ensures consistency throughout the iteration. If upstream logic modifies the source collection after the Loop node has started, those changes do not affect the current run. This prevents a class of subtle bugs where mid-loop data changes cause unpredictable iteration counts or skipped items.

Combined with the Break and Continue nodes, the Loop node supports sophisticated iteration patterns — early exit when a condition is met, skipping invalid items, and accumulating results — all without any imperative code, using only the visual workflow graph.

Use Cases

Process Each Invoice Line Item

An accounts payable workflow loops over the array of line items extracted from a scanned invoice. For each item, it validates the product code against the catalogue, applies the appropriate tax rate, and accumulates a running total. After the loop, the done port triggers the final invoice approval step with all line items validated.

Send Emails to a Recipient List

A bulk notification workflow loads a list of recipients into a workflow variable and loops over it. For each recipient, personalised email content is generated using the recipient's name and preferences, then dispatched via the email integration node. The loop's done port triggers a completion notification to the campaign manager.

Validate Each Product in a Cart

Before checkout, a cart validation workflow loops over the items array. For each item, it checks current stock availability via an inventory API. If any item is out of stock, a Break node exits the loop early and routes to a stock-alert page. If all items pass, the done port proceeds to payment processing.

Process Each Employee in a Payroll Batch

A payroll automation workflow loops over the list of employees scheduled for the current pay period. For each employee, it calculates gross pay, deductions, and net pay based on their contract and time records, then generates a payslip document. The done port triggers the final bank transfer batch submission.

Apply Discounts to Each Order Item

A promotions engine loops over order items to apply product-specific discounts. For each item, it checks whether an active promotion applies to the product category, calculates the discount amount, and updates the item's price field in the execution context. The loop accumulates total savings for display on the order summary.

In This Guide

Configuration

Configure the items variable name and understand how the loop injects per-iteration context into the execution memory.

Input & Output

Body and done port behaviour, per-iteration data injection, Break/Continue signal handling, and data accumulation patterns.

Examples

End-to-end loop configurations for invoice processing, email dispatch, cart validation, and early-exit patterns.