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 Value 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.

The properties of a transition instance are as follows:

Name Value 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 List of String A list of execution ids.

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": "8f72bc9f-d505-11e2-bafa-3c970e140ef1",
  "parentActivityInstanceId": null,
  "activityId": "executionProcess:1:8ef5c393-d505-11e2-bafa-3c970e140ef1",
  "processInstanceId": "8f72bc9f-d505-11e2-bafa-3c970e140ef1",
  "processDefinitionId": "executionProcess:1:8ef5c393-d505-11e2-bafa-3c970e140ef1",
  "childActivityInstances": [
      {
          "id": "SubProcess_1:8f72bca4-d505-11e2-bafa-3c970e140ef1",
          "parentActivityInstanceId": "8f72bc9f-d505-11e2-bafa-3c970e140ef1",
          "activityId": "SubProcess_1",
          "activityType": "subProcess",
          "processInstanceId": "8f72bc9f-d505-11e2-bafa-3c970e140ef1",
          "processDefinitionId": "executionProcess:1:8ef5c393-d505-11e2-bafa-3c970e140ef1",
          "childActivityInstances": [],
          "childTransitionInstances": [
              {
                  "id": "8f72bca9-d505-11e2-bafa-3c970e140ef1",
                  "parentActivityInstanceId": "SubProcess_1:8f72bca4-d505-11e2-bafa-3c970e140ef1",
                  "processInstanceId": "8f72bc9f-d505-11e2-bafa-3c970e140ef1",
                  "processDefinitionId": "executionProcess:1:8ef5c393-d505-11e2-bafa-3c970e140ef1",
                  "activityId": "ServiceTask_1",
                  "executionId": "8f72bca9-d505-11e2-bafa-3c970e140ef1"
              },
              {
                  "id": "8f72bcaa-d505-11e2-bafa-3c970e140ef1",
                  "parentActivityInstanceId": "SubProcess_1:8f72bca4-d505-11e2-bafa-3c970e140ef1",
                  "processInstanceId": "8f72bc9f-d505-11e2-bafa-3c970e140ef1",
                  "processDefinitionId": "executionProcess:1:8ef5c393-d505-11e2-bafa-3c970e140ef1",
                  "activityId": "ServiceTask_2",
                  "executionId": "8f72bcaa-d505-11e2-bafa-3c970e140ef1"
              }
          ],
          "executionIds": [
              "8f72bc9f-d505-11e2-bafa-3c970e140ef1"
          ]
      }
  ],
  "childTransitionInstances": [],
  "executionIds": [
      "8f72bc9f-d505-11e2-bafa-3c970e140ef1"
  ]
}

On this Page: