Steps
Steps are the units of work, sync HTTP, async HTTP, in-engine scripts, or sub-flows. Each declares its inputs, outputs, and lifecycle, and the engine wires them together by attribute name.
What is a Step?
A Step is a unit of work in Argyll. Each Step declares what it needs (inputs) and what it produces (outputs). Steps can be:
- HTTP endpoints that call external services
- Inline scripts that transform data
- Sub-Flows that package reusable Goals
Step Types
Sync HTTP
Use this when a service can return its result immediately. The Step calls an endpoint and waits for the response. Sync and async Steps may optionally declare a compensate URL: if the step fails after some work items have already succeeded, the engine calls that endpoint for each succeeded work item. See Compensation.
Steps with memoizable: true cannot declare a compensate URL.
Async HTTP
Use this when work starts now and completes later by webhook. The Step initiates work and provides a webhook URL for callbacks.
Script
Use this for small in-engine transforms, routing, and glue logic. Execute Lua or Ale expressions directly in the engine.
Sub-Flow
Package a reusable set of Goals behind one Step. Sub-Flows let you compose complex Flows.
Attributes
Steps declare inputs and outputs as named Attributes. When one Step’s output Attribute matches another’s input, Argyll connects them automatically. No explicit wiring required.
Outputs: customer"] B["Step B
Inputs: customer
Outputs: balance"] C["Step C
Inputs: balance"] A -->|customer| B B -->|balance| C style A fill:#fff3e0 style B fill:#fff3e0 style C fill:#fff3e0
Input Roles
- Required: The Step cannot run without this value
- Optional: The Step can run without this value
Output Roles
Outputs declare what values the Step produces and makes available to downstream Steps.
Step Lifecycle
Each Step in a Flow moves through its own state machine:
Skipped is a terminal state that counts as complete for Flow purposes. When a Step is skipped, upstream work that only served that Step is pruned with it.
Predicates
A Step can include a Predicate. If it evaluates to false when the Step’s inputs are ready, the Step is skipped and no service call is made.
Match Predicates
Required inputs can also declare a match script that filters upstream values before the Step runs. Each candidate value from upstream providers is evaluated against the match; only values that pass are collected. If no values pass once all providers finish, the Step is skipped.
{
"attributes": {
"payment_result": {
"role": "required",
"required": {
"match": {
"language": "jpath",
"script": "$.status == \"approved\""
}
}
}
}
}
This is more precise than a Step-level Predicate: the match filters individual upstream values rather than gating on the Step’s full input state.