Is it possible to retrieve process diagram with tokens

Hi -

I know there is an api to retrieve the process diagram. Is there any way to retrieve a diagram for a process instance that shows where the current process tokens are? I am looking for something similar to what you can show in cockpit for a current instance where the tokens are shown in either little blue or grey circles attached to the activities. I do not see such a capability in the rest API but maybe I am missing something. Thanks

Bill

Hey Bill!
So in general you cannot do this with only one rest call. :smiley:
As you have pointed out you would need to retrieve the process diagram first of all using for instance GET /process-definition/{id}/diagram.
Afterwards we need to take a look on the running instances. A good start is always to get all of the instances running on a definition by calling GET /process-instance?processDefinitionKey=....
Once that is done you can finally get some information about at which activity instance a certain process instance is waiting at by calling GET /process-instance/{id}/activity-instances.

If you have received all this information it is up to you to display the “tokens” in the BPMN diagram.
Hopefully this was helpful for you! :slight_smile:
-Thomas