<step>

<step> is the fundamental durable operation in WOML. It runs one script and records its successful JSON result before downstream scheduling.

Why use it

Use it when a unit of business work needs stable identity, durable output, bounded retries, inspection, and recovery semantics.

Common use cases

  • Transform trigger input.
  • Call an external API or managed service.
  • Persist data.
  • Aggregate earlier durable outputs.

Syntax

WOML
<step
  id="createOrder"
  name="Create order"
  retry="3"
  retry-backoff="exponential"
  retry-delay="1s"
  retry-max-delay="30s"
>
  <script>return await createOrder(context.payload);</script>
</step>

Rules and behavior

  • id is required; name and description are optional.
  • A fundamental step contains exactly one <script>.
  • The successful JSON result becomes context.steps.<stepId>.
  • retry is total attempts from 1 through 10.
  • Only definitive script_threw failure retries automatically; timeout, invalid JSON, size failure, crash, interruption, and cancellation fail closed.
  • Per-step timeout attributes are unsupported; workflow timeout belongs in <config>.