processInstance.getParentInstanceUUID() alternative to Bonita v7.5.4

1
+1
-1

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.

Comments

Submitted by antoine.mottier on Wed, 01/17/2018 - 14:15

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

Submitted by mtsiak_1358773 on Wed, 01/17/2018 - 15:16

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

Submitted by mtsiak_1358773 on Thu, 01/18/2018 - 14:19

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

No answers yet.
Notifications