Rollback Process Instance

API Type

REST

HTTP Method

POST

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.

URL Format (On Premises)

https://[domain]:[port]/AgilePointServer/Workflow/RollbackProcInst/[activityInstanceID]

URL Format (AgilePoint for Azure)

https://[domain]:[port]/AgilePointService/Workflow/RollbackProcInst/[activityInstanceID]

Request Parameters

Name Description

activityInstanceID

Definition:
The unique ID for an activity instance.
Type
string
Allowed Values:
A valid activity instance ID.

JavaScript Code Example

$("#btnRollbackProcInst").click(function () {

  $.ajax({
    url: "https://mydomain:9011/AgilePointServer/Workflow/
                RollbackProcInst/3E14D9BE837C47F2BA17A724508AC8CD",
  });

});

Java Code Example

public String RollbackProcInst(String activityInstanceID) {

  String URI = "http://mydomain:9011/AgilePointServer/Workflow/RollbackProcInst/"
                       + activityInstanceID;

  HTTPOperations ops = new HTTPOperations(domain, this.userName,
                       password, appID, locale);

  JSONObject postData = new JSONObject();

  return ops.POSTMethod(URI, postData.toString());
}

C# Code Example

public string RollbackProcInst()
  {
    string URI = "http://mydomain:9011/AgilePointServer/Workflow/
                         RollbackProcInst/3E7376EC110A4B558B5138F69D2E1462";

    HTTPOperations ops = new HTTPOperations(domain, this.userName, 
                         password, appID, locale);

    return ops.POSTMethod(URI, "");
  }

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.

JSON Response Body Example

{
  "ActivityInstID": "0F6B47906A0C4B469AC9CB9A7F2FF831",
  "AutoStart": true,
  "CustomAttributes": null,
  "Diagnostic": true,
  "EndDate": "\/Date(928149600000+0000)\/",
  "Entries": 1,
  "Error": null,
  "EventID": "3A664D0A8D4B4B6AA41F7DB1D606876F",
  "EventName": "RollbackProcessInstance",
  "HighPriority": true,
  "ParamsXml": "<?xml version=\"1.0\" encoding=\"utf-8\"?>
                <WFEvent>
                  <param name=\"ProcInstID\" 
                            value=\"00131C75A35046A89E32B64C4649E075\" \/>
                  <param name=\"ActivityInstID\" 
                            value=\"0F6B47906A0C4B469AC9CB9A7F2FF831\" \/>
                  <param name=\"HighPriority\" value=\"True\" \/>
                <\/WFEvent>",
  "ParentProcInstID": "",
  "ProcDefID": "",
  "ProcInstID": "00131C75A35046A89E32B64C4649E075",
  "ProcInstName": "",
  "Sender": "demo3\\administrator",
  "SentDate": "\/Date(1394144131068+0000)\/",
  "SourceWorkItemID": "",
  "Status": "Sent",	
  "UserID": "",
  "WorkItemID": "",
  "WorkObjectID": "",
  "WorkObjectInfo": ""
}

Supported Versions

AgilePoint BPMS v5.0 R2 and higher