How do I get process instances?

This is my flow chart。
How do I get an A process instance in the B process?
Or get all the relevant process instances.

How does this code write?
thanks

Hi @hyj,

What is you goal?

You can use APIs like RuntimeService#createProcessInstanceQuery to search for any kind of process instances.

Cheers
Thorben

Thank you
I found a solution, using businessKey to query all the processInstance.

1 Like