Skip to content

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.

- $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 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, outside with:.

Inline form works too: with: { X: 5, Y: 3 }.

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.

These sit outside with: and tune how Zenvara runs the step:

KeyPurpose
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 ($products:) — output is captured into the payload. Use when later steps need the result.
  • Unnamed — used for pure side effects: a log: line, an if: condition, an unnamed for-each: over side-effect-only operations. Unnamed for-each: loops are sandboxed — inner state does not escape (see Control Flow).