Skip to main content

Function: startChildRun()

startChildRun<TInput, TOutput>(parent, frame, node, input, options?): Promise<ExecutionRun<InferSchemaOutput<TOutput>>>

Defined in: packages/core/src/runtime/local-runs.ts:706

Start node as a child run of parent, at the child's own place, at the address parent.child(frame).

The child's run id is childRunId(parent.child(frame)), so starting it is idempotent: a parent that crashed before recording the child starts the same id again, and the place attaches. In a durable parent the reference is recorded (record child at the child address) before this returns, and a resumed parent attaches to it instead of starting a new child. A local child of a durable parent keeps its journal in the parent's store.

Refuses with ExecutionCancelledError when the parent was cancelled. Cancelling the parent cancels every child it recorded.

Type Parameters​

TInput​

TInput

TOutput​

TOutput

Parameters​

parent​

ExecutionContext

frame​

AddressFrame

node​

Processable<TInput, TOutput>

input​

TInput

options?​

Omit<ExecutionStartOptions, "runId" | "journal"> = {}

Returns​

Promise<ExecutionRun<InferSchemaOutput<TOutput>>>