WorkflowInstanceManager.CancelInstance Method

Cancels the specified workflow instance.

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

Syntax

'Declaration
Public Function CancelInstance ( _
    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.CancelInstance(workflowName, _
    instanceName, reason)
public WorkflowInstanceResult CancelInstance(
    string workflowName,
    string instanceName,
    string reason
)
public:
WorkflowInstanceResult^ CancelInstance(
    String^ workflowName, 
    String^ instanceName, 
    String^ reason
)
member CancelInstance : 
        workflowName:string * 
        instanceName:string * 
        reason:string -> WorkflowInstanceResult
public function CancelInstance(
    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 cancelled.
  • reason
    Type: System.String
    The reason for cancelling the instance.

Return Value

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

See Also

Reference

WorkflowInstanceManager Class

Microsoft.Workflow.Client Namespace