Retrieving the contextual variable processInstanceId and parentProcessId from the UI.

Hi everyone,
I’m currently trying to retrieve a business data object keyed by the processInstanceId via a filtered query. Unfortunately, I can’t figure how to  access the processInstanceId or the parentProcessId from the UI. 

Any thought

Thx
david