cancel
Showing results for 
Search instead for 
Did you mean: 

Getting the process ID of a called subprocess

floickelsheimer
Champ in-the-making
Champ in-the-making
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!
11 REPLIES 11

rahul11
Champ in-the-making
Champ in-the-making
Hi ,
I have created userTask which needs multilevel approval. when process get initiated, task id and other details are wrapped in response. But once first level1 approves(action: complete) the task a new user task gets created for level2 . let me know how to establish connection between created task for level 2 and  level 1. When i marked task action as complete response is null. I am using rest API.


trademak
Star Contributor
Star Contributor
@Rahul and how is that related to this post?
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.