WorkflowTestType

PackageFCQRS.Workflows
Runs workflows in memory, for tests. See `WorkflowTest<'Input, 'Result>`.

Specification

Kind
Type
Members
7
Examples
0
RecoverSignature
WorkflowTest.Recover(workflow, journal)
RecoverSignature
WorkflowTest.Recover(definition, journal)
StartSignature
WorkflowTest.Start(workflow, input)
StartSignature
WorkflowTest.Start(workflow, input, now)
StartSignature
WorkflowTest.Start(definition, input)

Summary

NameSignatureSynopsis
RecoverWorkflowTest.Recover(workflow, journal)Recovers a C# workflow's instance from a stored journal.
RecoverWorkflowTest.Recover(definition, journal)Recovers an instance from a stored journal, such as one a test of the previous version of the workflow produced, and runs this code over it, as the process does after a deploy.
StartWorkflowTest.Start(workflow, input)Starts a C# workflow with `input` at `WorkflowTest.DefaultStart`.
StartWorkflowTest.Start(workflow, input, now)Starts a C# workflow with `input` at `now`.
StartWorkflowTest.Start(definition, input)Starts the workflow with `input` at `WorkflowTest.DefaultStart`.
StartWorkflowTest.Start(definition, input, now)Starts the workflow with `input` at `now`, and runs the body until it waits.
DefaultStartWorkflowTest.DefaultStartThe time a test starts at unless it gives one: 1 January 2026, 00:00 UTC.

Recover

WorkflowTest.Recover(workflow, journal)
Member
Recovers a C# workflow's instance from a stored journal. See the definition overload.

Parameters

NameTypeDescription
workflowWorkflow<'Input, 'Result>
journalWorkflowRecord seq

Returns

WorkflowTest<'Input, 'Result>

Recover

WorkflowTest.Recover(definition, journal)
Member
Recovers an instance from a stored journal, such as one a test of the previous version of the workflow produced, and runs this code over it, as the process does after a deploy. `Status` reports `Parked` when the journal does not match the code. The test's time starts at the last record's time.

Parameters

NameTypeDescription
definitionWorkflowDefinition<'Input, 'Result>
journalWorkflowRecord seq

Returns

WorkflowTest<'Input, 'Result>

Start

WorkflowTest.Start(workflow, input)
Member
Starts a C# workflow with `input` at `WorkflowTest.DefaultStart`.

Parameters

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

Returns

WorkflowTest<'Input, 'Result>

Start

WorkflowTest.Start(workflow, input, now)
Member
Starts a C# workflow with `input` at `now`.

Parameters

NameTypeDescription
workflowWorkflow<'Input, 'Result>
input'Input
nowDateTime

Returns

WorkflowTest<'Input, 'Result>

Start

WorkflowTest.Start(definition, input)
Member
Starts the workflow with `input` at `WorkflowTest.DefaultStart`.

Parameters

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

Returns

WorkflowTest<'Input, 'Result>

Start

WorkflowTest.Start(definition, input, now)
Member
Starts the workflow with `input` at `now`, and runs the body until it waits. The input is stored and read back, as `Start` does.

Parameters

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

Returns

WorkflowTest<'Input, 'Result>

DefaultStart

WorkflowTest.DefaultStart
Member
The time a test starts at unless it gives one: 1 January 2026, 00:00 UTC.

Returns

DateTime