ChildStepsModule
PackageFCQRS.Workflows
Steps that start other workflows.
Summary
| Name | Signature | Synopsis |
|---|---|---|
| startChild | startChild definition input | Starts another workflow and gives its handle once the child's start is stored. |
| awaitChild | awaitChild handle | Waits for a child workflow to end and gives its result. |
| child | child definition input | Starts a child workflow and waits for its result. |
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
| Name | Type | Description |
|---|---|---|
| definition | WorkflowDefinition<'Input, 'Result> | |
| input | 'Input |
Returns
Workflow<ChildHandle<'Result>>
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
| Name | Type | Description |
|---|---|---|
| handle | ChildHandle<'Result> |
Returns
Workflow<'Result>