Flows
A Flow is one execution run driven by a set of Goal Steps. Covers the lifecycle (active, terminal, deactivated), how state advances, and how Flows compose through sub-flow Steps.
What is a Flow?
A Flow is one execution run. You specify Goal Steps and initial values, then Argyll plans and executes the work needed to reach those Goals. The same Flow definition can be executed many times with different inputs.
Flow Execution
When you start a Flow:
- You provide the Goal Steps you want to achieve
- You provide initial state values
- Argyll plans what work is required
- Argyll executes Steps in parallel where possible
- Results are stored in committed state
- The Flow advances based only on what it already knows
Flow Lifecycle
A Flow moves through three phases:
Active: Steps are running, events are being recorded, the Flow is progressing toward its Goals.
Terminal (completed or failed): The logical outcome is decided. Either all Goal Steps succeeded, or one failed. No new Steps will start. However, work that was already in flight may still complete and have its results recorded. This is intentional: the audit trail stays complete even after the outcome is known.
Deactivated: Terminal and no pending or active work remains. The Flow is fully settled. Its event log is complete and immutable.
Flow State
Every Flow has explicit state that you can inspect at any time:
- What Steps have executed and what status they reached
- What outputs each Step produced
- What Steps are still pending
- Why the Flow is in its current state
Reusable Flows
Flows can be packaged as Sub-Flow Steps. This lets you compose complex Flows from simpler ones. A Sub-Flow Step targets a specific set of Goals and maps its outputs back to parent Flow Attributes.