REST: Find (also) all active call activities by business key, possible?

Hi,

have the task to identifiy the status of a process by analyzing the current state of main process and all subprocesses. All share the same business key. If I call /engine-rest/task?businessKey=abc, I will only find the tasks, but for the analysis I need also all active call activities. The modeler names Call activities as a task, but for the engine it seems not to be a task, just an activity…

Is it possible to find also active call activities?

Best Regards,
Michael

Hi Michael,

you can request the activity instance tree of the process instance, maybe this is helpful for you.
Make a GET request on /process-instance/{id}/activity-instances
where id is the process instance id.

To found out the process instance id send a GET request to the
/execution?businessKey=abc resource, with your buisness key.
This will also return the executions for the sub processes.
See the docs for more informations.

Greetings,
Chris

HI team,

In my process I have used “callActivity” this successfully called subprocess.

Now I need to get sub process instance ID using parent process instance ID (calling process);

please help… even rest service or QueryService (back end code)

Thanks in advance…
DineshKumar Arivarasan

https://docs.camunda.org/manual/7.5/reference/rest/process-instance/get-query/

You can either search for superProcessInstance or subProcessInstances

1 Like

Thanks, Why can’t we use process-instance/{id}/activity-instances
Here what is the use of childActivityInstances and why it is empty for callActivity?

In case someone need a way to get all process instance child process instances via Java API

runtimeService.createProcessInstanceQuery()
    .superProcessInstanceId(processInstance.id).list()