Documentation / Advanced

Wait without holding a worker

A timer or callback parks the phase in durable state. Resume happens after the timer sweep or an accepted callback.

Park on a timer

waitDuration supports minutes, hours and days. It is not an SQS delay or a sleeping handler. A configured sweeper must resume due timers.

json
{
  "waitDuration": "30m"
}
Complete example · JSON / YAML

JSON

json
{
  "name": "advanced-timer",
  "version": "1.0.0",
  "lanes": {
    "inline": {
      "mode": "sync_lambda",
      "target": "lambda://local-inline"
    }
  },
  "phases": {
    "work": {
      "service": "hello",
      "lane": "inline",
      "scope": "root",
      "terminal": true,
      "waitDuration": "30m"
    }
  }
}

YAML

yaml
name: advanced-timer
version: 1.0.0
lanes:
  inline:
    mode: sync_lambda
    target: lambda://local-inline
phases:
  work:
    service: hello
    lane: inline
    scope: root
    terminal: true
    waitDuration: 30m

Download JSON · YAML

shell
rippflow controls validate advanced-timer.workflow.yaml --json

Expected: ok: true. This checks the contract; deployment/enforcement is separate.

Wait for an external event

waitForCallback requires the issued token; callbackTimeout bounds the wait. The engine persists a verifier, not the raw bearer token. Verified early arrivals are buffered; replay, wrong-tenant and invalid-token callbacks are rejected.

json
{
  "waitForCallback": true,
  "callbackTimeout": "1h"
}
Complete example · JSON / YAML

JSON

json
{
  "name": "advanced-callback",
  "version": "1.0.0",
  "lanes": {
    "inline": {
      "mode": "sync_lambda",
      "target": "lambda://local-inline"
    }
  },
  "phases": {
    "work": {
      "service": "hello",
      "lane": "inline",
      "scope": "root",
      "terminal": true,
      "waitForCallback": true,
      "callbackTimeout": "1h"
    }
  }
}

YAML

yaml
name: advanced-callback
version: 1.0.0
lanes:
  inline:
    mode: sync_lambda
    target: lambda://local-inline
phases:
  work:
    service: hello
    lane: inline
    scope: root
    terminal: true
    waitForCallback: true
    callbackTimeout: 1h

Download JSON · YAML

shell
rippflow controls validate advanced-callback.workflow.yaml --json

Expected: ok: true. This checks the contract; deployment/enforcement is separate.

What is verified

Direct in-memory probes park a timer with zero active worker compute, reject early resumption, resume at the due clock, reject invalid/cross-tenant/replayed callbacks and time out an expired wait. Logical time is injected; no AWS stack or live sweeper is certified.

Inspect installation waits through execution history; do not invent callback tokens or post unsigned webhooks.

Use the shown positive durations and one wait kind per phase. Current control validation can accept malformed wait durations or unknown phase keys; acceptance is not proof that a field is implemented.

Verified sources

Checked 2026-11-05.

Let's talk

Contact Rippflow

Tell us about your workflows, deployment or pricing.

We'll reply to your email.

Search docs

Search workflows, handlers and operations.