IAwaitableWorkflowRun.WaitForCompletionAsync<TResult> Method

Definition

Waits for the workflow to complete and returns the result.

public System.Threading.Tasks.ValueTask<TResult?> WaitForCompletionAsync<TResult>(System.Threading.CancellationToken cancellationToken = default);
abstract member WaitForCompletionAsync : System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<'Result>
Public Function WaitForCompletionAsync(Of TResult) (Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of TResult)

Type Parameters

TResult

The expected result type.

Parameters

cancellationToken
CancellationToken

A cancellation token to observe.

Returns

ValueTask<TResult>

The result of the workflow execution.

Exceptions

Thrown when the workflow failed or was terminated.

Applies to