Share via


DurableTaskClient.WaitForInstanceStartAsync Method

Definition

Overloads

WaitForInstanceStartAsync(String, CancellationToken)

Waits for an orchestration to start running and returns a OrchestrationMetadata object that contains metadata about the started instance.

WaitForInstanceStartAsync(String, Boolean, CancellationToken)

Waits for an orchestration to start running and returns a OrchestrationMetadata object that contains metadata about the started instance.

WaitForInstanceStartAsync(String, CancellationToken)

Waits for an orchestration to start running and returns a OrchestrationMetadata object that contains metadata about the started instance.

public virtual System.Threading.Tasks.Task<Microsoft.DurableTask.Client.OrchestrationMetadata> WaitForInstanceStartAsync (string instanceId, System.Threading.CancellationToken cancellation);
abstract member WaitForInstanceStartAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.DurableTask.Client.OrchestrationMetadata>
override this.WaitForInstanceStartAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.DurableTask.Client.OrchestrationMetadata>
Public Overridable Function WaitForInstanceStartAsync (instanceId As String, cancellation As CancellationToken) As Task(Of OrchestrationMetadata)

Parameters

instanceId
String

The unique ID of the orchestration instance to wait for.

cancellation
CancellationToken

A CancellationToken that can be used to cancel the wait operation.

Returns

Returns a OrchestrationMetadata record that describes the orchestration instance and its execution status or null if no instance with ID instanceId is found.

Applies to

WaitForInstanceStartAsync(String, Boolean, CancellationToken)

Waits for an orchestration to start running and returns a OrchestrationMetadata object that contains metadata about the started instance.

public abstract System.Threading.Tasks.Task<Microsoft.DurableTask.Client.OrchestrationMetadata> WaitForInstanceStartAsync (string instanceId, bool getInputsAndOutputs = false, System.Threading.CancellationToken cancellation = default);
abstract member WaitForInstanceStartAsync : string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.DurableTask.Client.OrchestrationMetadata>
Public MustOverride Function WaitForInstanceStartAsync (instanceId As String, Optional getInputsAndOutputs As Boolean = false, Optional cancellation As CancellationToken = Nothing) As Task(Of OrchestrationMetadata)

Parameters

instanceId
String

The unique ID of the orchestration instance to wait for.

getInputsAndOutputs
Boolean

Specify true to fetch the orchestration instance's inputs, outputs, and custom status, or false to omit them. The default value is false to minimize the network bandwidth, serialization, and memory costs associated with fetching the instance metadata.

cancellation
CancellationToken

A CancellationToken that can be used to cancel the wait operation.

Returns

Returns a OrchestrationMetadata record that describes the orchestration instance and its execution status or null if no instance with ID instanceId is found.

Remarks

A "started" orchestration instance is any instance not in the Pending state.

If an orchestration instance is already running when this method is called, the method will return immediately.

Applies to