AnsweredAssumed Answered

Getting the process ID of a called subprocess

Question asked by floickelsheimer on Nov 27, 2012
Latest reply on Sep 25, 2013 by raghuramanpe
Dear community,
I need some help with the following scenario:

Description of the situation:
I have got two processes, one parent process and one subprocess which is triggered by its parent via a call activity. The subprocess contains multiple user tasks where the user has to input various values. All process events (start events, task completion, etc.) should be triggered via REST API calls from external frontend systems.
To complete a task of a certain process instance, I usually do 2 webservice calls with the REST API: the first one is to get all open tasks for a certain process instance (processId) which normally returns the task ID. This task ID I use in a second call to complete the desired user task (with the corresponding values).

The problem:
The problem now is that I do not have the process ID of the subprocess. When starting the parent process via REST, I only get the process ID of the parent but not of the subprocess. Since the user tasks are part of the subprocess I have no possibility to complete these tasks then.
Therefore: Is there any possibility to get the process Id of a subprocess when having the process Id of its parent (for example in combination with the call activity)?

What I have tried (based on the Activiti userguide):
1.) Calling "Get Process Instance Details" of the parent process returns only the activityId of the call activity plus some additional attributes (but not of the called process).
2.) Calling "Get open tasks for a process instance" of the parent process returns an empty JSON object since there are no open tasks for the parent process at this stage.

Thanks a lot!