Getting all Activity names/Ids from a BPMn process

How do I get all the names/ids of all the activities in a BPMN Process that is running?

I can get the activity instances and name/id etc that are waiting when I use the following code, but I need a full list of all the activities that are Active or inactive. I have the ProcessdefitionId, but trying to find what API can take the Processdefinitionid or processinstance id and get the Activity Names. If the solution is only via reading the BPMN XML file , how can I use the Processdefinitionkey to get the file and read the file and get activities?

ActivityInstance processActivityInstance = runtimeService.getActivityInstance(processInstanceId);
processActivityInstance.getChildActivityInstances();

Hi @adat,

you can use the Model API to get the activity names. The BPMN XML can be retrieved by the repository service.

Related topic: Get all bpmn state names without parsing xml

Best regards,
Philipp

1 Like