Unknown macro: {next_previous_links}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

This section provides details on the BPMN statistics REST API and the methods used to generate the statistics in the BPMN-explorer. The following sections lists out the methods involved in retrieving statistics.

All the methods of the REST API will be invoked after the base URL.

Base URL

Base URL: https://<hostname>:<port-name>/bpmn/stats/

Retrieving statistics about processes and tasks

/processTaskServices/

Method get: /deployedProcessCount
DescriptionGet the process count of the deployed processes.
ParametersHeader Parameter - Media types acceptable for the response. Default is JSON.
Return TypeDeployed processes with their process count.
Example Data
{
 "data": [
 {
 "processDefinitionId": "helloWorldProcess:1:11",
 "deployedProcessCount": 1
 },
 {
 "processDefinitionId": "manualTaskProcess:1:15",
 "deployedProcessCount": 4
 }
 ]
}
Methodget: /processStatusCount
DescriptionGet the number of process instances with various states.
ParametersHeader Parameter - Media types acceptable for the response. Default is JSON.
Return TypeCount of process instances in each state.
States: Completed, Active, Suspended, Failed
Example Data
{
 "data": [
 {
 "count": 2,
 "statusOfProcessOrTask": "Completed"
 },
 {
 "count": 4,
 "statusOfProcessOrTask": "Active"
 },
 {
 "count": 0,
 "statusOfProcessOrTask": "Suspended"
 },
 {
 "count": 0,
 "statusOfProcessOrTask": "Failed"
 }
 ]
}
Methodget: /taskStatusCount
DescriptionGet the number of task instances with various states.
ParametersHeader Parameter - Media types acceptable for the response. Default is JSON.
Return Type

Count of task instances in each state.

States: Completed, Active, Suspended, Failed

Example Data
{
 "data": [
 {
 "count": 4,
 "statusOfProcessOrTask": "Completed"
 },
 {
 "count": 4,
 "statusOfProcessOrTask": "Active"
 },
 {
 "count": 0,
 "statusOfProcessOrTask": "Suspended"
 },
 {
 "count": 0,
 "statusOfProcessOrTask": "Failed"
 }
 ]
}
Methodget: /avgDurationToCompleteProcess
DescriptionGet the average time duration of completed processes.
ParametersHeader Parameter - Media types acceptable for the response. Default is JSON.
Return Type

Completed processes and the average time duration for each process.

Example Data
{
 "data": [
 {
 "processDefinitionId": "helloWorldProcess:1:11",
 "averageTimeForCompletion": 0.26085
 },
 {
 "processDefinitionId": "manualTaskProcess:1:15",
 "averageTimeForCompletion": 24.555516666666666
 }
 ]
}
Methodget: /avgTaskDurationForCompletedProcess/{pId}
DescriptionGet the average time duration of each task in a completed process.
Parameters

pId: process Definition Id of the process (required).

Header Parameter - Media types acceptable for the response. Default is JSON.

Return Type

Completed tasks with their average time duration for each completed process.

Example Data
Request – > /avgTaskDurationForCompletedProcess/manualTaskProcess:1:15
{
 "data": [
 {
 "taskDefinitionKey": "orderConfirmed",
 "averageTimeForCompletion": 722751
 },
 {
 "taskDefinitionKey": "placeOrder",
 "averageTimeForCompletion": 4117232
 },
 {
 "taskDefinitionKey": "statusOfDelivery",
 "averageTimeForCompletion": 7973
 }
 ]
}
Methodget: /taskVariation
DescriptionGet the task variation over time i.e., tasks started and completed over the months.
ParametersHeader Parameter - Media types acceptable for the response. Default is JSON.
Return Type

Number of tasks started and completed over the months.

Example Data
{
 "data": [
 {
 "startedInstances": 10,
 "completedInstances": 4,
 "month": "Jan"
 },
 {
 "startedInstances": 6,
 "completedInstances": 3,
 "month": "Feb"
 },
 {
 "startedInstances": 9,
 "completedInstances": 9,
 "month": "March"
 },
 {
 "startedInstances": 2,
 "completedInstances": 4,
 "month": "April"
 },
 {
 "startedInstances": 0,
 "completedInstances": 0,
 "month": "May"
 },
 {
 "startedInstances": 11,
 "completedInstances": 7,
 "month": "June"
 },
 {
 "startedInstances": 14,
 "completedInstances": 12,
 "month": "July"
 },
 {
 "startedInstances": 4,
 "completedInstances": 3,
 "month": "Aug"
 },
 {
 "startedInstances": 2,
 "completedInstances": 1,
 "month": "Sep"
 },
 {
 "startedInstances": 2,
 "completedInstances": 2,
 "month": "Oct"
 },
 {
 "startedInstances": 0,
 "completedInstances": 0,
 "month": "Nov"
 },
 {
 "startedInstances": 10,
 "completedInstances": 7,
 "month": "Dec"
 }
 ]
}
Methodget: /processVariation
DescriptionGet the process variation over time i.e., process instances started and completed over the months.
ParametersHeader Parameter - Media types acceptable for the response. Default is JSON.
Return Type

Number of process instances started and completed over the months.

Example Data
{
 "data": [
 {
 "startedInstances": 3,
 "completedInstances": 3,
 "month": "Jan"
 },
 {
 "startedInstances": 10,
 "completedInstances": 5,
 "month": "Feb"
 },
 {
 "startedInstances": 8,
 "completedInstances": 6,
 "month": "March"
 },
 {
 "startedInstances": 3,
 "completedInstances": 2,
 "month": "April"
 },
 {
 "startedInstances": 14,
 "completedInstances": 12,
 "month": "May"
 },
 {
 "startedInstances": 20,
 "completedInstances": 12,
 "month": "June"
 },
 {
 "startedInstances": 6,
 "completedInstances": 3,
 "month": "July"
 },
 {
 "startedInstances": 0,
 "completedInstances": 0,
 "month": "Aug"
 },
 {
 "startedInstances": 6,
 "completedInstances": 1,
 "month": "Sep"
 },
 {
 "startedInstances": 9,
 "completedInstances": 7,
 "month": "Oct"
 },
 {
 "startedInstances": 11,
 "completedInstances": 10,
 "month": "Nov"
 },
 {
 "startedInstances": 6,
 "completedInstances": 3,
 "month": "Dec"
 }
 ]
}
Methodget: /allProcesses
DescriptionGet all the deployed processes.
ParametersHeader Parameter - Media types acceptable for the response. Default is JSON.
Return Type

Deployed processes

Example Data
{
 "data": [
 "helloWorldProcess:1:11",
 "manualTaskProcess:1:15",
 "testProcess:1:4",
 "userTaskProcess:1:10"
 ]
}

Retrieving statistics about users

/userServices/

Methodget: /allUsers
DescriptionGet all the users from user store.
ParametersHeader Parameter - Media types acceptable for the response. Default is JSON.
Return Type

User list

Example Data
{
 "data": [
 "admin",
 "testClerk"
 ]
 }
Methodget: /userVsTaskCount
DescriptionGet the number of completed tasks of the users.
ParametersHeader Parameter - Media types acceptable for the response. Default is JSON.
Return Type

Users with the number of tasks completed by each of them.

Example Data
{
 "data": [
 {
 "userName": "admin",
 "taskCount": 4
 },
 {
 "userName": "testClerk",
 "taskCount": 3
 }
 ]
 }
Methodget: /userVsAvgTimeDuration
DescriptionGet the average time taken by each user to complete tasks.
ParametersHeader Parameter - Media types acceptable for the response. Default is JSON.
Return Type

Users with the average time taken by each user to complete tasks.

Example Data
{
 "data": [
 {
 "userName": "admin",
 "avgTimeDuration": 372.24275
 },
 {
 "userName": "testClerk",
 "avgTimeDuration": 2740.863
 }
 ]
}
Methodget: /userTaskVariation/{assignee}
DescriptionGet the task variation of each user over time i.e., tasks started and completed by each user over the months.
Parameters

assignee: user (required).

Header Parameter - Media types acceptable for the response. Default is JSON

Return Type

Number of tasks started and completed over the months by the selected user.

Example Data
{
 "data": [
 {
 "startedInstances": 3,
 "completedInstances": 4,
 "month": "Jan"
 },
 {
 "startedInstances": 10,
 "completedInstances": 8,
 "month": "Feb"
 },
 {
 "startedInstances": 6,
 "completedInstances": 5,
 "month": "March"
 },
 {
 "startedInstances": 4,
 "completedInstances": 2,
 "month": "April"
 },
 {
 "startedInstances": 9,
 "completedInstances": 10,
 "month": "May"
 },
 {
 "startedInstances": 7,
 "completedInstances": 6,
 "month": "June"
 },
 {
 "startedInstances": 5,
 "completedInstances": 2,
 "month": "July"
 },
 {
 "startedInstances": 0,
 "completedInstances": 0,
 "month": "Aug"
 },
 {
 "startedInstances": 1,
 "completedInstances": 1,
 "month": "Sep"
 },
 {
 "startedInstances": 2,
 "completedInstances": 2,
 "month": "Oct"
 },
 {
 "startedInstances": 10,
 "completedInstances": 6,
 "month": "Nov"
 },
 {
 "startedInstances": 5,
 "completedInstances": 4,
 "month": "Dec"
 }
 ]
}

 

Response Codes

Response CodeDescription
200- OkIndicates that the response was found and returned.
401- Unauthorized

The operation failed.

The operation requires an Authentication header to be set. If this was present in the request, the supplied credentials are not valid or the user is not authorized to perform this operation.

404- Not FoundIndicates the requested details was not found.
405 - Method Not AllowedThe operation failed. The used method is not allowed for this resource.
415 - Unsupported Media Type

The operation failed.

The request body contains an unsupported media type. This also occurs when the request-body JSON contains an unknown attribute or value that does not have the right format/type to be accepted.

500 - Internal Server ErrorThe operation failed. An unexpected exception occurred while executing the operation. The response-body contains details about the error.
  • No labels