Edit

Share via


WorkflowControlClient.TerminateAsync Method

Definition

Begins an asynchronous terminate operation.

Overloads

TerminateAsync(Guid)

Begins an asynchronous operation that terminates the specified workflow instance.

TerminateAsync(Guid, Object)

Begins an asynchronous operation that terminates the specified workflow instance with the specified user-defined data.

TerminateAsync(Guid, String)

Begins an asynchronous operation that terminates the specified workflow instance with the specified reason.

TerminateAsync(Guid, String, Object)

Begins an asynchronous operation that terminates the specified workflow instance with the specified reason and user-defined data.

TerminateAsync(Guid)

Begins an asynchronous operation that terminates the specified workflow instance.

public:
 void TerminateAsync(Guid instanceId);
public void TerminateAsync (Guid instanceId);
member this.TerminateAsync : Guid -> unit
Public Sub TerminateAsync (instanceId As Guid)

Parameters

instanceId
Guid

The workflow instance to terminate.

Remarks

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by Terminate(Guid).

Applies to

TerminateAsync(Guid, Object)

Begins an asynchronous operation that terminates the specified workflow instance with the specified user-defined data.

public:
 void TerminateAsync(Guid instanceId, System::Object ^ userState);
public void TerminateAsync (Guid instanceId, object userState);
member this.TerminateAsync : Guid * obj -> unit
Public Sub TerminateAsync (instanceId As Guid, userState As Object)

Parameters

instanceId
Guid

The workflow instance to terminate.

userState
Object

The user-defined state data.

Applies to

TerminateAsync(Guid, String)

Begins an asynchronous operation that terminates the specified workflow instance with the specified reason.

public:
 void TerminateAsync(Guid instanceId, System::String ^ reason);
public void TerminateAsync (Guid instanceId, string reason);
member this.TerminateAsync : Guid * string -> unit
Public Sub TerminateAsync (instanceId As Guid, reason As String)

Parameters

instanceId
Guid

The workflow instance to terminate.

reason
String

The reason to terminate the workflow instance.

Remarks

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by Terminate(Guid, String).

Applies to

TerminateAsync(Guid, String, Object)

Begins an asynchronous operation that terminates the specified workflow instance with the specified reason and user-defined data.

public:
 void TerminateAsync(Guid instanceId, System::String ^ reason, System::Object ^ userState);
public void TerminateAsync (Guid instanceId, string reason, object userState);
member this.TerminateAsync : Guid * string * obj -> unit
Public Sub TerminateAsync (instanceId As Guid, reason As String, userState As Object)

Parameters

instanceId
Guid

The workflow instance to terminate.

reason
String

The reason to terminate the workflow instance.

userState
Object

The user-defined state data.

Applies to