Query Activity Instances

API Type

REST

HTTP Method

POST

Description

Retrieves activity instances that match a query expression.

URL Format (On Premises)

https://[domain]:[port]/AgilePointServer/Workflow/QueryActivityInsts

URL Format (AgilePoint for Azure)

https://[domain]:[port]/AgilePointService/Workflow/QueryActivityInsts

Request Parameters

Name Description
None Not Applicable

Request Body Properties

Name Description

expr

Definition:
Specifies the where clause of a SQL query expression.
Type
WFQueryExprHelper
Allowed Values:
A valid WFQueryExpr object.

ColumnName

Definition:
Gets and sets the associated database column name.
Type
string
Allowed Values:
A valid database column name.

Operator

Definition:
Specifies the operator used for comparison.
Type
int
Allowed Values:
A valid operator.

IsValue

Definition:
Gets and sets the flag that indicates if it compares a value or column of the table.
Type
bool
Allowed Values:
  • True - It compares a value or column of the table.
  • False - It does not compare a value or column of the table.

JavaScript Code Example

$("#btnQueryActivityInsts").click(function () {
  
  var JSONObject = {
    ColumnName: "ID", Operator: "EQ", WhereClause: "0D9835B27E1A483EA1517ACA1296EDAD", 
                                                  IsValue: true
  };
  $.ajax({
    url: "https://mydomain:9011/AgilePointServer/Workflow/QueryActivityInsts",
    data: JSON.stringify(JSONObject)
  });
  
});

Java Code Example

public String QueryActivityInsts(String ColumnName, String Operator,
  String WhereClause, boolean IsValue) {

  String URI = "http://mydomain:9011/AgilePointServer/Workflow/QueryActivityInsts";

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

  JSONObject postData = new JSONObject();
  try {
    postData.put("ColumnName", ColumnName);
    postData.put("Operator", Operator);
    postData.put("WhereClause", WhereClause);
    postData.put("IsValue", IsValue);
    return ops.POSTMethod(URI, postData.toString());
  } catch (JSONException e1) {
    e1.printStackTrace();
  }
  return "";
}

Output

An array of WFBaseActivityInstance objects.

JSON Response Body Example

[{
  "CompletedDate": "\/Date(1385676471223+0000)\/",
  "DisplayName": "START",
  "DueDate": "\/Date(928149600000+0000)\/",
  "ID": "0D9835B27E1A483EA1517ACA1296EDAD",
  "InStack": true,
  "Name": "Start",
  "Pending": false,
  "Session": 1,
  "StartedDate": "\/Date(1385676471223+0000)\/",
  "TokenPos":
  {
    "Value": 0
  },
  "Tokens": 0
}]

Supported Versions

AgilePoint BPMS v5.0 R2 and higher