ChildStepsModule

PackageFCQRS.Workflows
Steps that start other workflows.

Summary

NameSignatureSynopsis
startChildstartChild definition inputStarts another workflow and gives its handle once the child's start is stored.
awaitChildawaitChild handleWaits for a child workflow to end and gives its result.
childchild definition inputStarts a child workflow and waits for its result.

startChild

startChild definition input
Member
Starts another workflow and gives its handle once the child's start is stored. The child's ID is this workflow's ID, a colon, and this step's path, so a repeated start after a crash reaches the same child and does not start a second one. A child that is never awaited runs on by itself and outlives this workflow. If this workflow is cancelled while the start is in flight, the child is cancelled too. The child's workflow must be registered with `Workflows.register` in the same process.

Parameters

NameTypeDescription
definitionWorkflowDefinition<'Input, 'Result>
input'Input

Returns

Workflow<ChildHandle<'Result>>

awaitChild

awaitChild handle
Member
Waits for a child workflow to end and gives its result. A child that faulted or was cancelled fails this step with `ChildFaulted`, and a result this step's type cannot read fails it with `NotRetryable`. If this workflow is cancelled while it waits, the child is cancelled too.

Parameters

NameTypeDescription
handleChildHandle<'Result>

Returns

Workflow<'Result>

child

child definition input
Member
Starts a child workflow and waits for its result.

Parameters

NameTypeDescription
definitionWorkflowDefinition<'Input, 'Result>
input'Input

Returns

Workflow<'Result>