Get Process Instance List
Method
GET /enhancement/process-instance
Parameters
Query Parameters
| Name | Description |
|---|---|
| processDefinitionKey | The processDefinitionKey of the process instance. |
| processDefinitionId | The processDefinitionId of the process instance. |
| withIncident | Query whether the process instance is Incident,default false. |
| firstResult | Pagination of results. Specifies the index of the first result to return. |
| maxResults | Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left. |
| sortBy | The sortable fields mainly include: instanceId, definitionId, definitionKey, definitionName, definitionVersion, businessKey, startTime, endTime, duration and tenantId . |
| orderBy | desc、asc. |
Result
A JSON array of historic process instance objects. Each historic process instance object has the following properties:
| Name | Type | Description |
|---|---|---|
| id | String | The id of the process instance. |
| rootProcessInstanceId | String | The process instance id of the root process instance that initiated the process. |
| superProcessInstanceId | String | The id of the parent process instance, if it exists. |
| superCaseInstanceId | String | The id of the parent case instance, if it exists. |
| caseInstanceId | String | The id of the parent case instance, if it exists. |
| processDefinitionName | String | The name of the process definition that this process instance belongs to. |
| processDefinitionKey | String | The key of the process definition that this process instance belongs to. |
| processDefinitionVersion | Integer | The version of the process definition that this process instance belongs to. |
| processDefinitionId | String | The id of the process definition that this process instance belongs to. |
| businessKey | String | The business key of the process instance. |
| startTime | String | The time the instance was started. Default format* yyyy-MM-dd'T'HH:mm:ss.SSSZ. |
| endTime | String | The time the instance ended. Default format* yyyy-MM-dd'T'HH:mm:ss.SSSZ. |
| removalTime | String | The time after which the instance should be removed by the History Cleanup job. Default format* yyyy-MM-dd'T'HH:mm:ss.SSSZ. |
| durationInMillis | Number | The time the instance took to finish (in milliseconds). |
| startUserId | String | The id of the user who started the process instance. |
| startActivityId | String | The id of the initial activity that was executed (e.g., a start event). |
| deleteReason | String | The provided delete reason in case the process instance was canceled during execution. |
| tenantId | String | The tenant id of the process instance. |
| state | String |
last state of the process instance, possible values are:
|
* For further information, please see the documentation.
Response Codes
| Code | Media type | Description |
|---|---|---|
| 200 | application/json | Request successful. |
| 404 | application/json | Historic external task log with given id does not exist. See the Introduction for the error response format. |
Example
Request
GET /enhancement/process-instance
Response
Status 200.
[
{
"id": "27449ab3-81e7-11ee-a14f-4674ac8809d4",
"businessKey": "default",
"processDefinitionId": "CMS_Withdrawal_V2:2:8c28bef2-81dd-11ee-bd02-4674ac8809d4",
"processDefinitionKey": "CMS_Withdrawal_V2",
"processDefinitionName": "CMS_Withdrawal_V2",
"processDefinitionVersion": 2,
"startTime": "2023-11-13 13:40:29.131",
"endTime": null,
"removalTime": null,
"durationInMillis": null,
"startUserId": "demo",
"startActivityId": null,
"deleteReason": null,
"rootProcessInstanceId": "27449ab3-81e7-11ee-a14f-4674ac8809d4",
"superProcessInstanceId": null,
"superCaseInstanceId": null,
"caseInstanceId": null,
"tenantId": null,
"state": "ACTIVE"
}
]