Workflow calls

JavaScript
const risk = await services.workflows.call(
  "calculate-risk",
  { customerId: context.payload.customerId },
  { name: "calculate-customer-risk", timeout: "30s" }
);

The target must be active in the same runtime or another local process sharing the same state database. The payload becomes the child's complete context.payload. call() waits for terminal child status and resolves to the child's final JSON value. A child must return JSON, including explicit null; missing/undefined output is an error.

Calls are independently durable, deduplicate retries, reject cycles, and apply the child's own runtime policy. A parent waiting for a child releases its concurrency slot. Synchronous call rejects targets containing Human Approval because the Bun continuation cannot be serialized across a long durable wait. Cancelling the waiting parent does not silently cancel the independent child. Workflow-call payloads are limited to 1 MiB and child results to 4 MiB.

services.workflows.start()

JavaScript
const child = await services.workflows.start(
  "send-report",
  { reportId: context.steps.report.id },
  { name: "start-report-delivery" }
);

start() waits only for durable admission/dispatch, then returns:

JavaScript
{ workflowId, runId, duplicate }

The parent continues while the child runs. The child's later failure does not retroactively fail the completed parent step. Use the returned run ID with woml get or log following.