What I do as a work around is I pass the processInstanceId of the root process down as a variable and I query based on that variable Instance...
The sub process instance is only loosely coupled to its parent. That means it doesn't have a reference to it, it is actually the parent process that will be listening for the completion of any of its children.
If you need to know the id of the parent process instance in the child, you could indeed just pass the process instance id as a variable.
You could also derive the child process instance ids from a parent process instance by looking at that process instance state at that point if you want, but that is the other direction.
can you guide me .. how can i get sub processinstanceid from parent processinstance id by its state as u mentoined in above post
Can you please guide me to retrieve or query the child process instance id from parent process instance id?
As you have mentioned in the post it is possible to get the child process instance ids from parent.