WorkflowFlowType
PackageFCQRS.Workflows
Akka.Streams stages that start workflows. `run` and `start` take an F# handle; `Run` and
`Start` take a C# client.
The stream is not durable. If the process stops, the workflows resume and the stream does
not, so the source must replay from an offset of its own, for example by committing only
after an element's outcome is emitted. Compute the workflow ID from the element: a replayed
element then reaches the instance it started before and starts no second one.
Specification
Kind
Type
Members
4
Examples
0
RunSignature
WorkflowFlow.Run(client, idOf, parallelism, timeout)
StartSignature
WorkflowFlow.Start(client, idOf, parallelism)
runSignature
WorkflowFlow.run handle idOf parallelism timeout
startSignature
WorkflowFlow.start handle idOf parallelism
Summary
| Name | Signature | Synopsis |
|---|---|---|
| Run | WorkflowFlow.Run(client, idOf, parallelism, timeout) | Starts one workflow per element and emits how it ended, in the input's order. |
| Start | WorkflowFlow.Start(client, idOf, parallelism) | Starts one workflow per element and emits the ID with true when this element started the workflow, and false when a workflow with this ID already existed. |
| run | WorkflowFlow.run handle idOf parallelism timeout | Starts one workflow per element and emits the ID with the workflow's outcome, in the input's order. |
| start | WorkflowFlow.start handle idOf parallelism | Starts one workflow per element and emits the ID with the start's answer. |
Starts one workflow per element and emits how it ended, in the input's order. A faulted
or cancelled workflow is an element like a finished one, not a failure of the stream. At
most `parallelism` elements are between their start and their outcome, so the stream keeps
at most that many workflows between start and outcome. It does not limit other workflows of
the same definition: those that resumed after a restart, and those whose timeout failed the
stream, run regardless. An element whose workflow does not end within `timeout` fails the
stream with a `TimeoutException`; the workflow itself carries on.
Parameters
| Name | Type | Description |
|---|---|---|
| client | IWorkflowClient<'Input, 'Result> | |
| idOf | Func<'Input, string> | |
| parallelism | int | |
| timeout | TimeSpan |
Returns
Flow<'Input, WorkflowEnded<'Result>, NotUsed>
Starts one workflow per element and emits the ID with true when this element started the
workflow, and false when a workflow with this ID already existed. An element is emitted
once its start is stored, and at most `parallelism` starts are in flight, so a slow journal
slows the source down. Output keeps the input's order. The started workflows run on after
their element is emitted, so `parallelism` does not limit how many run.
Parameters
| Name | Type | Description |
|---|---|---|
| client | IWorkflowClient<'Input, 'Result> | |
| idOf | Func<'Input, string> | |
| parallelism | int |
Returns
Flow<'Input, (string * bool), NotUsed>
Starts one workflow per element and emits the ID with the workflow's outcome, in the
input's order. A faulted or cancelled workflow is an element like a finished one. At most
`parallelism` elements are between their start and their outcome, so the stream keeps at
most that many workflows between start and outcome. It does not limit other workflows of
the same definition: those that resumed after a restart, and those whose timeout failed the
stream, run regardless. An element whose workflow does not end within `timeout` fails the
stream with a `TimeoutException`; the workflow itself carries on.
Parameters
| Name | Type | Description |
|---|---|---|
| handle | WorkflowHandle<'Input, 'Result> | |
| idOf | 'Input -> string | |
| parallelism | int | |
| timeout | TimeSpan |
Returns
Flow<'Input, (string * WorkflowOutcome<'Result>), NotUsed>
Starts one workflow per element and emits the ID with the start's answer. An element is
emitted once its start is stored, and at most `parallelism` starts are in flight, so a
slow journal slows the source down. Output keeps the input's order. The started workflows
run on after their element is emitted, so `parallelism` does not limit how many run.
Parameters
| Name | Type | Description |
|---|---|---|
| handle | WorkflowHandle<'Input, 'Result> | |
| idOf | 'Input -> string | |
| parallelism | int |
Returns
Flow<'Input, (string * StartResult), NotUsed>