Cancel Process Instance

API Type

Web Services

Description

Cancels the process instance based on a specified process instance identifier. This method cancels all automatic work items, manual work items, and child process instances.

Syntax

public virtual WFEvent CancelProcInst(string processInstanceID)

Parameters

Name Description

processInstanceID

Definition:
Specifies the unique ID of a process instance.
Type
string
Allowed Values:
A valid process instance ID

Output

WFEvent object that provides the status of the transaction. The possible statuses are:

  • Sent - Indicates event has been sent to engine for processing.
  • Failed - Indicates event failed to process.
  • Processed - Indicates event has been processed successfully.
  • Canceled - Indicates event was canceled.
  • Deferred - Indicates event does not need to be sent immediately.

Example

IWFWorkflowService svc = GetWorkflowService();
string processInstanceID = ..// the ID of the process instance to be
canceled.

try
	{
    WFEvent evt = svc.CancelProcInst(processInstanceID);
	}

catch( Exception ex)
	{
    base.ShowMessage( base.GetSoapMessage(ex));
	}

Supported Versions

3.2.0.4 and higher