Get Process Instance Statistics

Retrieves runtime statistics of the process engine, grouped by process definitions. These statistics include the number of running process instances, optionally the number of failed jobs and also optionally the number of incidents either grouped by incident types or for a specific incident type.
Note: This does not include historic data.

Method

GET /process-definition/statistics

Parameters

Query Parameters

Name Description
failedJobs Whether to include the number of failed jobs in the result or not. Valid values are true or false.
incidents Valid values for this property are true or false. If this property has been set to true the result will include the corresponding number of incidents for each occurred incident type. If it is set to false, the incidents will not be included in the result. Cannot be used in combination with incidentsForType.
incidentsForType If this property has been set with any incident type (i.e., a string value) the result will only include the number of incidents for the assigned incident type. Cannot be used in combination with incidents. See the User Guide for a list of incident types.

Result

A JSON array containing statistics results per process definition. Each object has the following properties:

Name Value Description
id String The id of the process definition the results are aggregated for.
instances Number The total number of running process instances of this process definition.
failedJobs Number The total number of failed jobs for the running instances.
Note: Will be 0 (not null), if failed jobs were excluded.
definition Object The process definition with the properties as described in the get single definition method.
incidents Array Each item in the resulting array is an object which contains the following properties:
  • incidentType: The type of the incident the number of incidents is aggregated for. See the User Guide for a list of incident types.
  • incidentCount: The total number of incidents for the corresponding incident type.
Note: Will be an empty array, if incidents or incidentsForType were excluded. Furthermore, the array will be also empty if no incidents were found.

Response Codes

Code Media type Description
200 application/json Request successful.
400 application/json If both query parameters incidents and incidentsForType were set. See the Introduction for the error response format.

Examples

Request with Query Parameter failedJobs=true

GET /process-definition/statistics?failedJobs=true

Response

[{"id":"aProcessDefinitionId",
  "instances":123,
  "failedJobs":42,
  "definition":
    {"id":"aProcessDefinitionId",
    "key":"aKey",
    "category":null,
    "description":null,
    "name":"aName",
    "version":0,
    "resource":null,
    "deploymentId":null,
    "diagram":null,
    "suspended":false,
    "tenantId":null,
    "versionTag":"1.0.0"},
  "incidents:" []
 },
 {"id":"aProcessDefinitionId:2",
  "instances":124,
  "failedJobs":43,
  "definition":
    {"id":"aProcessDefinitionId:2",
    "key":"aKey",
    "category":null,
    "description":null,
    "name":"aName",
    "version":0,
    "resource":null,
    "deploymentId":null,
    "diagram":null,
    "suspended":false,
    "tenantId":null,
    "versionTag":null},
  "incidents:" []
}]

Request with Query Parameter incidents=true

GET /process-definition/statistics?incidents=true

Response

[{"id":"aProcessDefinitionId",
  "instances":123,
  "failedJobs":0,
  "definition":
    {"id":"aProcessDefinitionId",
    "key":"aKey",
    "category":null,
    "description":null,
    "name":"aName",
    "version":0,
    "resource":null,
    "deploymentId":null,
    "diagram":null,
    "suspended":false,
    "tenantId":null,
    "versionTag":"1.0.0"},
  "incidents":
  [
    {"incidentType":"failedJob", "incidentCount": 42 },
    {"incidentType":"anIncident", "incidentCount": 20 }
  ]
 },
 {"id":"aProcessDefinitionId:2",
  "instances":124,
  "failedJobs":0,
  "definition":
    {"id":"aProcessDefinitionId:2",
    "key":"aKey",
    "category":null,
    "description":null,
    "name":"aName",
    "version":0,
    "resource":null,
    "deploymentId":null,
    "diagram":null,
    "suspended":false,
    "tenantId":null,
    "versionTag":null},
  "incidents":
  [
    { "incidentType":"failedJob", "incidentCount": 43 },
    { "incidentType":"anIncident", "incidentCount": 22 }
    { "incidentType":"anotherIncident", "incidentCount": 15 }
  ]
}]

Request with Query Parameter incidentsForType=anIncident

GET /process-definition/statistics?incidentsForType=anIncident

Response

[{"id":"aProcessDefinitionId",
  "instances":123,
  "failedJobs":0,
  "definition":
    {"id":"aProcessDefinitionId",
    "key":"aKey",
    "category":null,
    "description":null,
    "name":"aName",
    "version":0,
    "resource":null,
    "deploymentId":null,
    "diagram":null,
    "suspended":false,
    "tenantId":null,
    "versionTag":"1.0.0"},
  "incidents":
  [
    {"incidentType":"anIncident", "incidentCount": 20 }
  ]
 },
 {"id":"aProcessDefinitionId:2",
  "instances":124,
  "failedJobs":0,
  "definition":
    {"id":"aProcessDefinitionId:2",
    "key":"aKey",
    "category":null,
    "description":null,
    "name":"aName",
    "version":0,
    "resource":null,
    "deploymentId":null,
    "diagram":null,
    "suspended":false,
    "tenantId":null,
    "versionTag":null},
  "incidents": []
}]

On this Page: