processInstance.getParentInstanceUUID() alternative to Bonita v7.5.4

I am trying to migrate a workflow to v7.5.x. At a groovy script the parent process id is fetched: processInstance.getParentInstanceUUID().
How do I do this on v7.5.4?

Is it something like the above:

  • apiAccessor.getProcessAPI().getProcessInstance(processInstanceId).getRootProcessInstanceId()
  • apiAccessor.getProcessAPI().getProcessInstance(processInstanceId).getCallerId()

Thank you in advance.

1 Like

If you only have one parent process you can use the provided variable rootProcessInstanceId

@antoine.mottier thank you. It worked.
Any idea on how to get the activity instances:
apiAccessor.getQueryRuntimeAP().getActivityInstances( a-process-uuid)

I found something like: apiAccessor.getProcessAPI().getActivities(rootProcessInstanceId, 0, 1000);