Complete Procedure

API Type

REST

HTTP Method

POST

Description

Marks an automatic work item as completed by an asynchronous activity.

URL Format (On Premises)

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

URL Format (AgilePoint for Azure)

https://[domain]:[port]/AgilePointService/Workflow/CompleteProcedure/[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

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

Java Code Example

public String CompleteProcedure(String workItemID) {

  String URI = "http://mydomain:9011/AgilePointServer/Workflow/CompleteProcedure/"
                       + 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 CompleteProcedure()
  {
    string URI = "http://mydomain:9011/AgilePointServer/Workflow/
                         CompleteProcedure/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": "980B0DBFC2E142DCB89671DE521034CD",
  "EventName": "CompleteProcedure",
  "HighPriority": true,
  "ParamsXml": "<?xml version=\"1.0\" encoding=\"utf-8\"?>
                <WFEvent>
                  <param name=\"ProcInstID\" 
                            value=\"540e835b76b646ba9d43fecba792d00d\" \/>
                  <param name=\"HighPriority\" value=\"True\" \/>
                  <param name=\"WorkItemID\" 
                            value=\"0406BF0DEB9140DC8FE61076376B6166\" \/>
                <\/WFEvent>",
  "ParentProcInstID": "",
  "ProcDefID": "",
  "ProcInstID": "540e835b76b646ba9d43fecba792d00d",
  "ProcInstName": "",
  "Sender": "demo3\\brian.lucas",
  "SentDate": "\/Date(1394153495472+0000)\/",
  "SourceWorkItemID": "",
  "Status": "Sent",	
  "UserID": "",
  "WorkItemID": "0406BF0DEB9140DC8FE61076376B6166",
  "WorkObjectID": "",
  "WorkObjectInfo": ""
}

Supported Versions

AgilePoint BPMS v5.0 R2 and higher