Steps & the with: Block
Every step is one of: a named operation ($name:), a control-flow construct (if:, for-each:, switch:), a transformer (join:, delta:, filter:), or a built-in verb (log:, return:, halt:, set:, $var:). This page covers the operation step.
Anatomy of a named operation
Section titled “Anatomy of a named operation”- $products: invoke: mssql.query # which operator action to run on: warehouse # which connection from the env (binding) timeout: 30s # step-level override with: # operator inputs go inside with: Query: "SELECT id, name FROM products WHERE active = 1"The one rule: with: vs step-level
Section titled “The one rule: with: vs step-level”The rule is simple, and almost every “unknown step parameter” error is a violation of it:
Anything the operator needs goes inside
with:. Anything Zenvara itself needs (on, retry, timeout, rollback) stays at the step level, outsidewith:.
Inline form works too: with: { X: 5, Y: 3 }.
Where results land
Section titled “Where results land”Results land in the payload under the assigned name — the $ is the assignment marker, not part of the key. Downstream steps reference them as ${products.rows}, ${products.body}, etc. The exact field names come from each operator’s definition.yaml (see the Operator Catalog).
There is no generic result key — every operator uses descriptive output field names (body, rows, path, content, data, …). Use the exact field name from the operator’s output schema.
Step-level overrides
Section titled “Step-level overrides”These sit outside with: and tune how Zenvara runs the step:
| Key | Purpose |
|---|---|
on: | Which connection alias from the environment to bind (replaced the older connection: keyword). |
timeout: | Per-step timeout, e.g. 30s, 2m. |
retry: | Retry policy for this step (count, backoff). |
rollback: | Override or disable the operator’s compensating action. |
Retry and rollback semantics are covered under Architecture (saga compensation) and the retry-and-error-handling reference.
Named vs unnamed steps
Section titled “Named vs unnamed steps”- Named (
$products:) — output is captured into the payload. Use when later steps need the result. - Unnamed — used for pure side effects: a
log:line, anif:condition, an unnamedfor-each:over side-effect-only operations. Unnamedfor-each:loops are sandboxed — inner state does not escape (see Control Flow).