Get Activity Instance
Retrieves an Activity Instance (Tree) for a given process instance by id.
Method
GET /process-instance/{id}/activity-instances
Parameters
Path Parameters
Name | Description |
---|---|
id | The id of the process instance for which the activity instance should be retrieved. |
Result
A JSON object corresponding to the Activity Instance tree of the given process instance.
The properties of an activity instance are as follows:
Name | Type | Description |
---|---|---|
id | String | The id of the activity instance. |
activityId | String | The id of the activity. |
activityName | String | The name of the activity. |
activityType | String | The type of activity (corresponds to the XML element name in the BPMN 2.0, e.g., 'userTask'). |
processInstanceId | String | The id of the process instance this activity instance is part of. |
processDefinitionId | String | The id of the process definition. |
childActivityInstances | List of activityInstance | A list of child activity instances. |
childTransitionInstances | List of transitionInstance | A list of child transition instances. A transition instance represents an execution waiting in an asynchronous continuation. |
executionIds | List of String | A list of execution ids. |
incidentIds | List of String | A list of incident ids. |
incidents | List of Objects |
A list of JSON objects containing incident specific properties:
|
The properties of a transition instance are as follows:
Name | Type | Description |
---|---|---|
id | String | The id of the transition instance. |
activityId | String | The id of the activity that this instance enters (asyncBefore job) or leaves (asyncAfter job) |
activityName | String | The name of the activity that this instance enters (asyncBefore job) or leaves (asyncAfter job) |
activityType | String | The type of the activity that this instance enters (asyncBefore job) or leaves (asyncAfter job). Corresponds to the XML element name in the BPMN 2.0, e.g., 'userTask'. |
processInstanceId | String | The id of the process instance. |
processDefinitionId | String | The id of the process definition. |
executionId | String | The id of the corresponding execution. |
incidentIds | List of String | A list of incident ids. |
incidents | List of Objects |
A list of JSON objects containing incident specific properties:
|
Response Codes
Code | Media type | Description |
---|---|---|
200 | application/json | Request successful. |
404 | application/json | Process instance with given id does not exist. See the Introduction for the error response format. |
Example
Request
GET /process-instance/aProcessInstanceId/activity-instances
Response
{
"id": "eca75c6b-f70c-11e9-8777-e4a7a094a9d6",
"parentActivityInstanceId": null,
"activityId": "invoice:2:e9d77375-f70c-11e9-8777-e4a7a094a9d6",
"activityType": "processDefinition",
"processInstanceId": "eca75c6b-f70c-11e9-8777-e4a7a094a9d6",
"processDefinitionId": "invoice:2:e9d77375-f70c-11e9-8777-e4a7a094a9d6",
"childActivityInstances": [
{
"id": "approveInvoice:eca89509-f70c-11e9-8777-e4a7a094a9d6",
"parentActivityInstanceId": "eca75c6b-f70c-11e9-8777-e4a7a094a9d6",
"activityId": "approveInvoice",
"activityType": "userTask",
"processInstanceId": "eca75c6b-f70c-11e9-8777-e4a7a094a9d6",
"processDefinitionId": "invoice:2:e9d77375-f70c-11e9-8777-e4a7a094a9d6",
"childActivityInstances": [],
"childTransitionInstances": [],
"executionIds": [
"eca75c6b-f70c-11e9-8777-e4a7a094a9d6"
],
"activityName": "Approve Invoice",
"incidentIds": [
"648d7e21-f71c-11e9-a725-e4a7a094a9d6"
],
"incidents": [
{
"id": "648d7e21-f71c-11e9-a725-e4a7a094a9d6",
"activityId": "AttachedTimerBoundaryEvent"
}
]
}
],
"childTransitionInstances": [],
"executionIds": [
"eca75c6b-f70c-11e9-8777-e4a7a094a9d6"
],
"activityName": "Invoice Receipt",
"incidentIds": null,
"incidents": null
}