IWorkflowClient<'TInput, 'TResult>Type

PackageFCQRS.Workflows
Starts and queries the instances of a registered workflow, from C#.

Specification

Kind
Type
Members
9
Examples
0
CancelAsyncSignature
this.CancelAsync
OutcomeAsyncSignature
this.OutcomeAsync
ResultAsyncSignature
this.ResultAsync
ResumeAsyncSignature
this.ResumeAsync
SignalAsyncSignature
this.SignalAsync

Summary

NameSignatureSynopsis
CancelAsyncthis.CancelAsyncCancels the instance.
OutcomeAsyncthis.OutcomeAsyncWaits up to `timeout` for the workflow to end and gives how it ended: finished, faulted, or cancelled.
ResultAsyncthis.ResultAsyncWaits up to `timeout` for the workflow to end and gives its result.
ResumeAsyncthis.ResumeAsyncResumes a faulted instance at the step whose failure faulted it.
SignalAsyncthis.SignalAsyncStores a signal for the instance.
StartAsyncthis.StartAsyncStarts the workflow with this ID under a reuse policy.
StartAsyncthis.StartAsyncStarts the workflow with this ID.
StatusAsyncthis.StatusAsyncWhere the instance is.
Namethis.NameThe workflow's name.

CancelAsync

this.CancelAsync
Member
Cancels the instance. Returns once the request is stored.

Parameters

NameTypeDescription
idstring

Returns

Task

OutcomeAsync

this.OutcomeAsync
Member
Waits up to `timeout` for the workflow to end and gives how it ended: finished, faulted, or cancelled. Throws `TimeoutException` when the time passes, and `InvalidOperationException` when no workflow with this ID was started.

Parameters

NameTypeDescription
idstring
timeoutTimeSpan

Returns

Task<WorkflowOutcome<'TResult>>

ResultAsync

this.ResultAsync
Member
Waits up to `timeout` for the workflow to end and gives its result. Throws `WorkflowFaultedException`, `WorkflowCancelledException`, or `TimeoutException`.

Parameters

NameTypeDescription
idstring
timeoutTimeSpan

Returns

Task<'TResult>

ResumeAsync

this.ResumeAsync
Member
Resumes a faulted instance at the step whose failure faulted it. Steps that completed before the failure do not run again. Throws `InvalidOperationException` when the instance has not faulted, when the body threw its own exception, or when it ran steps after the failure.

Parameters

NameTypeDescription
idstring

Returns

Task

SignalAsync

this.SignalAsync
Member
Stores a signal for the instance. Returns once it is stored.

Parameters

NameTypeDescription
idstring
namestring
payload'TSignal

Returns

Task

StartAsync

this.StartAsync
Member
Starts the workflow with this ID under a reuse policy. With `WorkflowIdReuse.AfterFailure`, an instance that faulted or was cancelled starts a new run with this input. True when this call started the workflow or a new run; false when it stored nothing.

Parameters

NameTypeDescription
idstring
input'TInput
reuseWorkflowIdReuse

Returns

Task<bool>

StartAsync

this.StartAsync
Member
Starts the workflow with this ID. True when this call started it; false when a workflow with this ID already existed, in which case nothing was stored.

Parameters

NameTypeDescription
idstring
input'TInput

Returns

Task<bool>

StatusAsync

this.StatusAsync
Member
Where the instance is.

Parameters

NameTypeDescription
idstring

Returns

Task<WorkflowStatus>

Name

this.Name
Member
The workflow's name.

Returns

string