Rollback Activity Instance

API Type

Web Services

Description

Rolls back a manual activity instance to the token position EN – that is, the state where the activity is entered. All work items associated with the manual activity instance with the status of NEW, OVERDUE, or ASSIGNED are canceled.

Syntax

public virtual WFEvent RollbackActivityInst(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 = …

try
	 {
  //Rolling back the activity instance
  WFEvent evt = svc.RollbackActivityInst(activityInstanceID);
	 }

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

Supported Versions

3.2.0.4 and higher