WorkflowApplication.BeginTerminate Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Terminates a workflow instance asynchronously using the IAsyncResult asynchronous design pattern.
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. |
For more information, see Asynchronous Programming Overview.
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
.NET Framework 4.8.1 and other versions
Product | Versions |
---|---|
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
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
.NET Framework 4.8.1 and other versions
Product | Versions |
---|---|
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
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
.NET Framework 4.8.1 and other versions
Product | Versions |
---|---|
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
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
.NET Framework 4.8.1 and other versions
Product | Versions |
---|---|
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: