Method StartAsync
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
definitionIdstringdataTDatactCancellationToken
Returns
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
definitionIdstringversionintdataTDatactCancellationToken
Returns
Type Parameters
TData