Workflow Automation Flow Logic Guide
Flow logic constructs control how a flow executes -- branching, looping, and termination. They are invoked from inside a flow or subflow body via wfa.flowLogic.*.
For API signatures, parameter tables, and condition operator reference, see the Flow Logic API.
Overview
| Type | Constructs | Use For |
|---|---|---|
| Conditional | if, elseIf, else | Branching |
| Loops | forEach, skipIteration, exitLoop | Iteration |
| Control | endFlow | Flow termination |
Condition syntax: Encoded query format -- use = not ==, ^ for AND, ^OR for OR. See the Flow Logic API → Condition Syntax Reference for the full operator catalog.
When to Use Which Construct
| Pattern | Flow Logic Construct | Use When |
|---|---|---|
| Route to different actions | if/elseIf/else | Different actions for different conditions |
| Process a list of records | forEach | Batch processing, multiple records |
| Stop processing early | exitLoop | Found target record, limit reached |
| Skip records in processing | skipIteration | Filtering, validation failed |
| Stop entire flow | endFlow | Early termination on critical condition |