Suspend Process Instance

API Type

REST

HTTP Method

POST

Description

Suspends a process instance. The process instance status is changed to Suspended, and the statuses of all the work items (tasks) become Pending.

URL Format (On Premises)

https://[domain]:[port]/AgilePointServer/Workflow/SuspendProcInst/[processInstanceID]

URL Format (AgilePoint for Azure)

https://[domain]:[port]/AgilePointService/Workflow/SuspendProcInst/[processInstanceID]

Request Parameters

Name Description

processInstanceID

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

JavaScript Code Example

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

  $.ajax({
    url: "https://mydomain:9011/AgilePointServer/Workflow/
                SuspendProcInst/248685A175F54C12A9A80353798B4508",
  });

});

Java Code Example

public String SuspendProcInst(String processInstanceID) {

  String URI = "http://mydomain:9011/AgilePointServer/Workflow/SuspendProcInst/"
                       + processInstanceID;

  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 SuspendProcInst()
  {
    string URI = "http://mydomain:9011/AgilePointServer/Workflow/
                         SuspendProcInst/FF0B6F6177234D7AB3EEFDBDF485093A";

    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": "",
  "AutoStart": true,
  "CustomAttributes": null,
  "Diagnostic": true,
  "EndDate": "\/Date(928149600000+0000)\/",
  "Entries": 1,
  "Error": null,
  "EventID": "36831B3A0BB04BD0B982C67C35892CB5",
  "EventName": "SuspendProcessInstance",
  "HighPriority": true,
  "ParamsXml": "<?xml version=\"1.0\" encoding=\"utf-8\"?>
                <WFEvent>
                  <param name=\"ProcInstID\" 
                            value=\"00131C75A35046A89E32B64C4649E075\" \/>
                  <param name=\"HighPriority\" value=\"True\" \/>
                <\/WFEvent>",
  "ParentProcInstID": "",
  "ProcDefID": "",
  "ProcInstID": "00131C75A35046A89E32B64C4649E075",
  "ProcInstName": "",
  "Sender": "demo3\\administrator",
  "SentDate": "\/Date(1394143631596+0000)\/",
  "SourceWorkItemID": "",
  "Status": "Sent",
  "UserID": "",
  "WorkItemID": "",
  "WorkObjectID": "",
  "WorkObjectInfo": ""
}

Supported Versions

AgilePoint BPMS v5.0 R2 and higher