Getting Process instance id after Call Activity task

Hi,
We have a use case in our current project wherein we are using activity tasks and redirecting the control to different bpmn files which works fine. But we are facing an issue when we try to complete task of the redirected bpmn as we are unable to find a rest call for fetching the process instance id of the bpmn the control is directed to.
Can you please assist us with any specific documentation to handle the same or a REST call to achieve the same?

Thanks in advance !!

Regards,
Aakanksha

If I understand you correctly, you could do a query:
https://docs.camunda.org/manual/7.9/reference/rest/process-instance/get-query/
and filter query parameter superProcessInstance=mainProcessInstanceId

Alright. Thanks for the instant response. Will try that and if we face any queries would post over here.