Table of Contents

Method StartAsync

Namespace
Millrace.Workflows
Assembly
Millrace.dll

StartAsync<TData>(string, TData, CancellationToken)

Starts an instance of the latest registered version of definitionId.

ValueTask<WorkflowInstanceId> StartAsync<TData>(string definitionId, TData data, CancellationToken ct = default)

Parameters

definitionId string
data TData
ct CancellationToken

Returns

ValueTask<WorkflowInstanceId>

Type Parameters

TData

Remarks

The instance record and the first activity job are created together, so an instance can never exist with nothing scheduled to advance it.

Exceptions

InvalidOperationException

No such definition is registered.

StartAsync<TData>(string, int, TData, CancellationToken)

Starts an instance pinned to a specific version, for a caller that must not drift onto a newer definition mid-rollout.

ValueTask<WorkflowInstanceId> StartAsync<TData>(string definitionId, int version, TData data, CancellationToken ct = default)

Parameters

definitionId string
version int
data TData
ct CancellationToken

Returns

ValueTask<WorkflowInstanceId>

Type Parameters

TData