Rollback Process Instance

API Type

Web Services

Description

Rolls a process instance back to a previous specified activity, or skips a specified activity if has not yet been completed. When this method is invoked, the current or skipped activity becomes canceled. When skipping, the process moves forward regardless of the activity's status.

Syntax

public virtual WFEvent RollbackProcInst(String activityInstanceID)

Parameters

Name Description

activityInstanceID

Definition:
The unique ID for an activity instance.
Type
string
Allowed Values:
A valid activity 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

//This is console application sample
IWFWorkflowService svc = GetWorkflowService();
string activityInstanceID = ..// target activity instance to roll back

try
	{
    WFEvent evt = workflowService.RollbackProcInst(activityInstanceID);
	}

catch (Exception ex)
	{
    Console.WriteLine("Failed! " + ShUtil.GetSoapMessage(ex));
	}

Supported Versions

3.2.0.4 and higher