Camunda 7.9 CallActivity - childActivityInstances REST api response Issue

Called activity subprocess giving processInstanceId and processDefinitionId of main process in childActivityInstances section in REST api call.

Ideally it should give processInstancId / processDefinitionId of child activity being called from main process.I am using camunda 9.0

REST Request

http://localhost:7001/camunda/api/engine/engine/default/process-instance/cf32c13d-7929-11e8-9886-185e0f247b87/activity-instances

Response
{
“id”: “cf32c13d-7929-11e8-9886-185e0f247b87”,
“parentActivityInstanceId”: null,
“activityId”: “AEO_Process:1:9164c37e-7929-11e8-9886-185e0f247b87”,
“activityType”: “processDefinition”,
“processInstanceId”: “cf32c13d-7929-11e8-9886-185e0f247b87”,
“processDefinitionId”: “AEO_Process:1:9164c37e-7929-11e8-9886-185e0f247b87”,
“childActivityInstances”: [
{
“id”: “Task_16d0rfx:cf35a77c-7929-11e8-9886-185e0f247b87”,
“parentActivityInstanceId”: “cf32c13d-7929-11e8-9886-185e0f247b87”,
“activityId”: “Task_16d0rfx”,
“activityType”: “callActivity”,
“processInstanceId”: “cf32c13d-7929-11e8-9886-185e0f247b87”, // this is same as main process processInstanceId. Should be called process processInstanceId
“processDefinitionId”: “AEO_Process:1:9164c37e-7929-11e8-9886-185e0f247b87”,// this is same as main process processDefinitionId. Should be called process processDefinitionId
“childActivityInstances”: [],
“childTransitionInstances”: [],
“executionIds”: [
“cf35806b-7929-11e8-9886-185e0f247b87”
],
“activityName”: “Application Sub Process”,
“name”: “Application Sub Process”
}
],
“childTransitionInstances”: [],
“executionIds”: [
“cf32c13d-7929-11e8-9886-185e0f247b87”
],
“activityName”: “AEO_Process”,
“name”: “AEO_Process”
}

1 Like

The response you posted is the expected result. You can use the GET /process-instance endpoint and its superProcessInstance parameter to find called processes.

Cheers,
Thorben

Hi Thorben,

I dont see superProcessInstance parameter on GET /process-instance endpoint (Ref :Get Instance | docs.camunda.org)
Am i checking right api ?

I have parent process instance id and want to get processinstanceid of called child process instance through REST.

This is the endpoint I mean: https://docs.camunda.org/manual/7.8/reference/rest/process-instance/get-query/

I would like to re-raise the question on top of this thread. Our use case is to retrieve the child activity instances of a parent process, in order to be able to map the Activity Name(s) (from the parent process) to the corresponding child activity instance process uuid.

Using the GET /process-instance endpoint and its superProcessInstance parameter to find called processes does not help in mapping the activity name from the parent process to the correct childSubprocess.