Flow Patterns

Use Attribute dependencies to express chains, parallel work, and fan-in.

Dependency Chain

Each Step consumes an output from the previous Step. Naming send-confirmation as the Goal pulls the entire chain into the Execution Plan: the Steps and dependencies selected for this run.

graph LR Init["order_id, items, payment"] Charge["charge-payment
transaction_id"] Reserve["reserve-inventory
reservation_id"] Ship["create-shipment
tracking_number"] Confirm["send-confirmation
goal"] Init --> Charge Charge --> Reserve Reserve --> Ship Ship --> Confirm

The Attribute chain provides the execution order. If a Step fails to produce its output, its consumers become unreachable; the Flow fails when that break prevents the Goal from running.

Parallel Fan-In

Steps with independent inputs become ready together. A downstream Goal that requires all of their outputs joins the branches.

graph TD Init["customer_id, email"] Documents["generate-documents
document_url"] Account["setup-account
account_id"] Welcome["send-welcome-email
email_sent"] Complete["complete-onboarding
goal"] Init --> Documents Init --> Account Init --> Welcome Documents --> Complete Account --> Complete Welcome --> Complete

Argyll runs the three producers concurrently as soon as their inputs are available. complete-onboarding starts after all three required outputs enter Flow state.

Repeated Input Values

For one Step processing an array or several collected values, use for_each. Argyll creates Work Items, applies the Step’s parallelism limit, and aggregates their outputs for downstream consumers.