WorkflowInstanceManager.TerminateInstance Method

Terminates specified workflow instance.

Namespace:  Microsoft.Workflow.Client
Assembly:  Microsoft.Workflow.Client (in Microsoft.Workflow.Client.dll)

Syntax

'Declaration
Public Function TerminateInstance ( _
    workflowName As String, _
    instanceName As String, _
    reason As String _
) As WorkflowInstanceResult
'Usage
Dim instance As WorkflowInstanceManager 
Dim workflowName As String 
Dim instanceName As String 
Dim reason As String 
Dim returnValue As WorkflowInstanceResult 

returnValue = instance.TerminateInstance(workflowName, _
    instanceName, reason)
public WorkflowInstanceResult TerminateInstance(
    string workflowName,
    string instanceName,
    string reason
)
public:
WorkflowInstanceResult^ TerminateInstance(
    String^ workflowName, 
    String^ instanceName, 
    String^ reason
)
member TerminateInstance : 
        workflowName:string * 
        instanceName:string * 
        reason:string -> WorkflowInstanceResult
public function TerminateInstance(
    workflowName : String, 
    instanceName : String, 
    reason : String
) : WorkflowInstanceResult

Parameters

  • workflowName
    Type: System.String
    The name of the workflow to which the instance belongs.
  • instanceName
    Type: System.String
    The name of the workflow instance to be terminated.
  • reason
    Type: System.String
    The reason for terminating the instance.

Return Value

Type: Microsoft.Activities.WorkflowInstanceResult
The workflow instance result of this operation.

See Also

Reference

WorkflowInstanceManager Class

Microsoft.Workflow.Client Namespace