Authoring
Everything you compose a real workflow out of — child workflows, durable entities, events, queries and updates, webhooks and external tasks, versioning, and scheduling.
Workflows & steps covers the primitive every workflow is built from. This section is what you reach for once one workflow is no longer enough.
Composition
- Child workflows — call a workflow from a workflow.
ctx.childawaits a result,ctx.startChildis fire-and-forget, andctx.allfans out N children of the same workflow and waits for all of them. Pass a class for typed input and output, or a name string for a child in another runtime. - Durable entities — keyed, long-lived virtual objects.
@Entity+@Ondeclare per-key state and its operations, serialized per key and applied exactly once.
Talking to a running run
- Queries & updates — read a live run's state without
disturbing it (
ctx.setEvent+engine.getEvent), and steer it with validated updates that can be rejected before they touch the run. - Event-driven workflows —
publishEventstarts every subscriber and resumes any run parked onctx.waitForEvent, with optional debounce/batch coalescing for bursty sources. - Durable webhooks — mint a callback URL, hand it to a third party
inside a step, and suspend with zero compute until they call back.
ctx.task()is the general form for external work you complete yourself.
Keeping it running
- Versioning & determinism — how in-flight runs stay replay-safe
across a deploy: workflow versions for breaking changes, the
NonDeterminismErrorguard, the deterministicnow/random/uuidsources, andctx.patchedfor an in-place change. - Scheduling — recurring workflows on a fixed interval or a DST-aware cron, started exactly once per window by an idempotent time-bucket run id.
Tenancy
What namespace and partition actually partition, how a store-less tenant borrows the control plane's store over the transport, and the boundary that keeps each tenant to its own runs.
Child workflows
Compose workflows by calling other workflows — await a child's result with ctx.child, kick one off fire-and-forget with ctx.startChild, or fan out N children of the same workflow and wait for all with ctx.all. Pass the workflow class for a typed input and result, or a name string for a cross-runtime child.