persistenceId and caseId or processDefinitionId

Hi, As I relate a case or process with a record of BDM (persistenceId)?
How to get the ID of the case of a record of BDM to know the BPM API data?

thank you

In Groovy Script:

import org.bonitasoft.engine.api.ProcessRuntimeAPI; // ProcessRuntimeAPI processRuntimeAPI = apiAccessor.getProcessAPI(); Long processInstanceId = processRuntimeAPI.getProcessInstance(processInstanceId).getId(); String processInstanceName = processRuntimeAPI.getProcessInstance(processInstanceId).getName();

regards
Seán

PS: As this reply answers your question, please mark as resolved by ticking the tick mark on the left of this reply.

<deleted and moved as reply>

Sorry can you make it a little clearer?

Ok Sean, thank you.
As I can relate a record in the BDM with caseid or processId.
Eg. In BDM I have {persistenceId, persistenceId_string, field1, field2, field3}
I need to show in detail the case that has this record.

How I see these data from a record BDM?
…/API/bpm/archivedActivity/{id}
This {{id}} where I get it?

When I see cases in the portal, in each case I see the data BDM but I see no field that can filter by {{id}}

It is to display on a page containing a table and looking for the record in the BDM with inputbox

What I thought is that when initializing a process save a field in the BDM with caseid. ?

This answer is non-sense....

You would need the `processInstanceId` in order to get the `processInstanceId` .....