Technical

Can I Create a Loop in a Workflow?

Last updated 02 June 2026

Can I Create a Loop in a Workflow?

No. Aitomic Flow does not support looping or cyclic flows.

A loop means routing a step's output back to an earlier step — for example, Step C → Step A — so the same steps repeat until a condition is met. This pattern is explicitly blocked and cannot be built.

Why loops are not supported

In the Flow Builder canvas

When you draw a connection, Aitomic Flow runs a cycle-detection check before accepting it. Starting from the target node, it walks all forward paths. If it can reach the source node, the connection is rejected and the wire snaps back. You cannot complete a connection that would form a cycle — not to an earlier Action step, not to the Trigger node, not to any previously visited node.

In the workflow engine

The runtime follows graph.edges from each completed step to find the next step. It has no concept of an iteration count, a "visited" set, or a loop limit. If a cycle were somehow present in the stored graph, the engine would attempt to create step instances indefinitely until it timed out.

In the data model

Flow instances track a single current_step_id. Step instances are append-only rows — there is no iteration-aware reset for SLA deadlines, escalation timers, or assignee resolution.

What to do instead

Most "loop until approved" use-cases fit one of these three patterns:

1. Rejection → Revise → Re-submit (recommended)

Model the loop explicitly as a linear path with a revision step:

Trigger
  → Submit request         (requester)
  → Manager review         (branch: Approve / Reject)
  → [Yes] Finance process  → Complete
  → [No]  Revise request   (requester)
        → Second review    (branch: Approve / Reject)
        → [Yes] Finance process  → Complete
        → [No]  Complete (rejected)

This supports up to N explicit revision rounds. Each round is a distinct set of step instances, visible in the instance history. SLA deadlines reset per step.

2. Re-trigger a new flow instance

When a request is rejected, the requester simply triggers the flow again from scratch. The new instance has a clean history. This is the simplest pattern and works well for short approval flows.

3. Multi-round review in a single flow

Add Round 2, Round 3 action steps explicitly to the canvas. The flow is longer but has a guaranteed end, clear history per round, and no cycle risk.

Summary

What you want What to do
Retry until approved (up to 2–3 rounds) Add explicit revision steps for each round
Unlimited retries Re-trigger a new flow instance on each rejection
Approval with back-and-forth comments Use the flow's comment thread for discussion; keep the approval step linear

See also