caseId of subprocess created by callActivity


I have 2 workflows with different variables. I call one with a call activity of the other and during the execution of the subprocess I want to know values of its variables.
To do this, I use the rest api request caseVariable with the caseId parameter.
But, the caseId of the subprocess is the same as the caseId of the parent process. And when i launch this request, I only get variables of parent process.
This way, I have no possibility to get variables of the subprocess by REST API request



External Link





Philippe Ozil
November 3, 2014, 2:51 PM

Hi Fabien,

This is in fact not a bug.
The Portal, displays the same "Case Id" for both processes (it displays the parent process instance id) as a convenience for non technical users.

However, each underlying process instance has a distinct id.
Please use the provided "processInstanceId" engine variable in a script to retrieve them (see attached process example).


November 12, 2014, 10:38 AM

Hi Philippe,
The example works fine but the problem is into the REST API.
So, using the REST API, how can I know instancied processes by a specific process instance ?
Because when i perform this request ( API/bpm/case?p=0&c=50) after start the fisrt process, I get this Json Object :

{"id":"1008","end_date":"","startedBySubstitute":"1","start":"2014-11-12 10:49:38.270","state":"started","rootCaseId":"1008","started_by":"1","processDefinitionId":"9165306712899641710","last_update_date":"2014-11-12 10:49:38.270"}]

But when i perform this request (API/bpm/case/1009), the process instance n°1009 exists.

{"id":"1009","end_date":"","startedBySubstitute":"0","start":"2014-11-12 10:49:40.532","state":"started","rootCaseId":"1008","started_by":"0","processDefinitionId":"7058532957718895515","last_update_date":"2014-11-12 10:49:40.532"}


Philippe Ozil
November 12, 2014, 1:25 PM

Hi Fabien,

Sorry for the misunderstanding, you are right about this.

I have checked your use case and even with this filtered call, the child process is still not listed in the results:

The REST "case" API is in fact the one used by the Portal to display the inbox so this is why it filters the list of results to only display parent processes.

Because of this specification, I am not sure that our issue will qualify as a bug. However, as you pointed out, we are missing a key API that could list process instances instead of cases.

I will try to report it in our internal tracker and I will let you know the outcome.


November 12, 2014, 1:40 PM

Thanks for your quick answer Philippe !

Philippe Ozil
November 18, 2014, 1:30 PM

Hi Fabien,

Just to let you know, this issue has been re-qualified as a "feature request".
One could question this change but as I stated earlier, the "case" API was designed to display the Portal inbox (only parent processes).
What we need now is a "processInstance" API.

I will continue to push for it but it may take a bit more time compared to a bug fix.
In the meantime, I will leave this ticket open so that I can update you on our progress.



Delphine Coille



Affects versions



Fix versions