Muokkaa

Jaa


WorkflowApplication.BeginTerminate Method

Definition

Terminates a workflow instance asynchronously using the IAsyncResult asynchronous design pattern.

Overloads

BeginTerminate(String, TimeSpan, AsyncCallback, Object)

Terminates a workflow instance asynchronously using the specified error message, time-out interval, callback method, and user-provided state.

BeginTerminate(Exception, AsyncCallback, Object)

Terminates a workflow instance asynchronously using the specified exception, callback method, and user-provided state.

BeginTerminate(String, AsyncCallback, Object)

Terminates a workflow instance asynchronously using the specified error message, callback method, and user-provided state.

BeginTerminate(Exception, TimeSpan, AsyncCallback, Object)

Terminates a workflow instance asynchronously using the specified exception, time-out interval, callback method, and user-provided state.

Remarks

For more information, see Asynchronous Programming Overview.

BeginTerminate(String, TimeSpan, AsyncCallback, Object)

Terminates a workflow instance asynchronously using the specified error message, time-out interval, callback method, and user-provided state.

public:
 IAsyncResult ^ BeginTerminate(System::String ^ reason, TimeSpan timeout, AsyncCallback ^ callback, System::Object ^ state);
public IAsyncResult BeginTerminate (string reason, TimeSpan timeout, AsyncCallback callback, object state);
member this.BeginTerminate : string * TimeSpan * AsyncCallback * obj -> IAsyncResult
Public Function BeginTerminate (reason As String, timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

Parameters

reason
String

The reason for terminating the workflow instance.

timeout
TimeSpan

The interval in which the BeginTerminate operation must complete before the operation is canceled and a TimeoutException is thrown.

callback
AsyncCallback

The method to be called when the BeginTerminate operation has completed.

state
Object

An optional application-specific object that contains information about the asynchronous operation.

Returns

A reference to the asynchronous BeginTerminate operation.

Remarks

This method schedules the termination of the workflow instance. To be notified when the termination has completed, use the Completed handle.

To determine whether the BeginTerminate operation was successful, call EndTerminate. EndTerminate can be called from inside or outside of the method reference in the callback parameter. If EndTerminate is called before the BeginTerminate operation completes, it blocks until the BeginTerminate operation completes. If the BeginTerminate operation does not complete within the specified time-out interval a TimeoutException is thrown from EndTerminate.

This method terminates a workflow instance asynchronously using the IAsyncResult asynchronous design pattern. For more information, see Asynchronous Programming Overview.

Applies to

BeginTerminate(Exception, AsyncCallback, Object)

Terminates a workflow instance asynchronously using the specified exception, callback method, and user-provided state.

public:
 IAsyncResult ^ BeginTerminate(Exception ^ reason, AsyncCallback ^ callback, System::Object ^ state);
public IAsyncResult BeginTerminate (Exception reason, AsyncCallback callback, object state);
member this.BeginTerminate : Exception * AsyncCallback * obj -> IAsyncResult
Public Function BeginTerminate (reason As Exception, callback As AsyncCallback, state As Object) As IAsyncResult

Parameters

reason
Exception

The reason the workflow instance is terminated.

callback
AsyncCallback

The method to be called when the BeginTerminate operation has completed.

state
Object

An optional application-specific object that contains information about the asynchronous operation.

Returns

A reference to the current BeginTerminate operation.

Remarks

This method schedules the termination of the workflow instance. To be notified when the termination has completed, use the Completed handle.

To determine whether the BeginTerminate operation was successful, call EndTerminate. EndTerminate can be called from inside or outside of the method referenced in the callback parameter. If EndTerminate is called before the BeginTerminate operation completes, it blocks until the BeginTerminate operation completes. By default, the BeginTerminate operation must complete in 30 seconds or a TimeoutException is thrown from EndTerminate.

This method terminates a workflow asynchronously using the IAsyncResult asynchronous design pattern. For more information, see Asynchronous Programming Overview.

Applies to

BeginTerminate(String, AsyncCallback, Object)

Terminates a workflow instance asynchronously using the specified error message, callback method, and user-provided state.

public:
 IAsyncResult ^ BeginTerminate(System::String ^ reason, AsyncCallback ^ callback, System::Object ^ state);
public IAsyncResult BeginTerminate (string reason, AsyncCallback callback, object state);
member this.BeginTerminate : string * AsyncCallback * obj -> IAsyncResult
Public Function BeginTerminate (reason As String, callback As AsyncCallback, state As Object) As IAsyncResult

Parameters

reason
String

The reason for terminating the workflow instance.

callback
AsyncCallback

The method to be called when the BeginTerminate operation has completed.

state
Object

An optional application-specific object that contains information about the asynchronous operation.

Returns

A reference to the current BeginTerminate operation.

Remarks

This method schedules the termination of the workflow instance. To be notified when the termination has completed, use the Completed handle.

To determine whether the BeginTerminate operation was successful, call EndTerminate. EndTerminate can be called from inside or outside of the method reference in the callback parameter. If EndTerminate is called before the BeginTerminate operation completes, it blocks until the BeginTerminate operation completes. By default, the BeginTerminate operation must complete in 30 seconds or a TimeoutException is thrown from EndTerminate.

This method terminates a workflow instance asynchronously using the IAsyncResult asynchronous design pattern. For more information, see Asynchronous Programming Overview.

Applies to

BeginTerminate(Exception, TimeSpan, AsyncCallback, Object)

Terminates a workflow instance asynchronously using the specified exception, time-out interval, callback method, and user-provided state.

public:
 IAsyncResult ^ BeginTerminate(Exception ^ reason, TimeSpan timeout, AsyncCallback ^ callback, System::Object ^ state);
public IAsyncResult BeginTerminate (Exception reason, TimeSpan timeout, AsyncCallback callback, object state);
member this.BeginTerminate : Exception * TimeSpan * AsyncCallback * obj -> IAsyncResult
Public Function BeginTerminate (reason As Exception, timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

Parameters

reason
Exception

The reason for terminating the workflow instance.

timeout
TimeSpan

The interval in which the BeginTerminate operation must complete before the operation is canceled and a TimeoutException is thrown.

callback
AsyncCallback

The method to be called when the BeginTerminate operation has completed.

state
Object

An optional application-specific object that contains information about the asynchronous operation.

Returns

A reference to the current BeginTerminate operation.

Remarks

This method schedules the termination of the workflow instance. To be notified when the termination has completed, use the Completed handle.

To determine whether the BeginTerminate operation was successful, call EndTerminate. EndTerminate can be called from inside or outside of the callback method. If EndTerminate is called before the BeginTerminate operation completes, it blocks until the BeginTerminate operation completes. If the BeginTerminate operation does not complete within the specified time-out interval a TimeoutException is thrown. This or any other exceptions that occur during the BeginTerminate process is thrown from EndTerminate.

This method terminates a workflow asynchronously using the IAsyncResult asynchronous design pattern. For more information, see Asynchronous Programming Overview.

Applies to