Child Workflows
Child workflows are independently durable runs. The graph engine left subflow execution unimplemented. The durable runtime supports call, spawn, and join.
dart
final receipt = await flow.call(
publishOrderWorkflow,
order,
id: 'publish-order',
);
final handle = await flow.spawn(
notifyWorkflow,
order,
id: 'notify',
);
final notifyResult = await flow.join(handle, id: 'wait-notify');call starts a child and waits. spawn returns a WorkflowHandle. join waits later. JSON uses call, spawn, and join steps; spawn publishes a handle map that join consumes.
A spawned run has its own history, commands, and digest. Cancellation of the parent reaches attached spawned runs. A spawn reconciler creates the child once and completes the parent command after the child reaches a terminal state.
callRef is the JSON-native call by WorkflowRef when the parent is a compiled document.