Update Process Instance

API Type

REST

HTTP Method

POST

Description

Updates attributes of a workflow process instance. The attributes that can be updated are listed in the attribute table.

URL Format (On Premises)

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

URL Format (AgilePoint for Azure)

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

Request Parameters

Name Description

processInstanceID

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

Request Body Properties

Name Description

attributes

Definition:
Name-value pairs associated with a custom ID.
Type
NameValue
Allowed Values:
A valid custom ID with an associated name.

Attributes

Name Description
ProcInstName The name of the process instance.
DueDate The date that the process instance is expected to be complete
workObjectID The ID of the work object.

JavaScript Code Example

$("#btnUpdateProcInst").click(function () {
  var JSONObject = { attributes: [{ Name: "PROCINSTNAME", Value: "test123" }]};
  $.ajax({
    url: "https://mydomain:9011/AgilePointServer/Workflow/
                UpdateProcInst/F05A692BBC514477BECA6586EFF90101",
    data: JSON.stringify(JSONObject)
  });
});

Java Code Example

public String UpdateProcessInstance(String processInstanceID,
  String[] Name, String[] Value) {

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

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

  JSONObject postMainData = new JSONObject();

  JSONArray postArray = new JSONArray();

  try {

    for (int i = 0; i < Name.length; i++) {
      JSONObject nameValuePair = new JSONObject();
      nameValuePair.put("Name", Name[i]);
      nameValuePair.put("Value", Value[i]);

      postArray.put(nameValuePair);
    }

    postMainData.put("attributes", postArray);
    return ops.POSTMethod(URI, postMainData.toString());
  } catch (JSONException e1) {
    e1.printStackTrace();
  }
  return "";
}

Output

None.

JSON Response Body Example

The response body is empty.

Supported Versions

AgilePoint BPMS v5.0 R2 and higher