Cancel Procedure

API Type

REST

HTTP Method

POST

Description

Cancels an automatic work item based on supplied specified automatic work item identifier.

URL Format (On Premises)

https://[domain]:[port]/AgilePointServer/Workflow/CancelProcedure/[workItemID]

URL Format (AgilePoint for Azure)

https://[domain]:[port]/AgilePointService/Workflow/CancelProcedure/[workItemID]

Request Parameters

Name Description

workItemID

Definition:
An ID that represents a work item (task).
Type
string
Allowed Values:
A valid, unique 32-byte work item (task) ID.

JavaScript Code Example

$("#btnCancelProcedure").click(function () {
  
  $.ajax({
    url: "https://mydomain:9011/AgilePointServer/Workflow/
                  CancelProcedure/CFF4B6D3DBF546A2B0423AD413A94420"
  });
});

Java Code Example

public String CancelProcedure(String workItemID) {

  String URI = "http://mydomain:9011/AgilePointServer/Workflow/CancelProcedure/"
                       + workItemID;

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

    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": "8D14B5AED0C04F4CAEC959157A433294",
  "EventName": "CancelProcedure",
  "HighPriority": true,
  "ParamsXml": "<?xml version=\"1.0\" encoding=\"utf-8\"?>
                <WFEvent>
                  <param name=\"ProcInstID\" 
                            value=\"3079D0D9031F4EBF808ED158C622FCC5\" \/>
                  <param name=\"HighPriority\" value=\"True\" \/>
                  <param name=\"WorkItemID\" 
                            value=\"0077C938254B4D6BAC2BD65566C706D6\" \/>
                <\/WFEvent>",
  "ParentProcInstID": "",
  "ProcDefID": "",
  "ProcInstID": "3079D0D9031F4EBF808ED158C622FCC5",
  "ProcInstName": "",
  "Sender": "demo3\\brian.lucas",
  "SentDate": "\/Date(1394153369353+0000)\/",
  "SourceWorkItemID": "",
  "Status": "Sent",	
  "UserID": "",
  "WorkItemID": "0077C938254B4D6BAC2BD65566C706D6",
  "WorkObjectID": "",
  "WorkObjectInfo": ""
}

Supported Versions

AgilePoint BPMS v5.0 R2 and higher