@mns you can read any bpmn model using this api:
BpmnModelInstance bpmnModelInstance = Bpmn.readModelFromStream(stream);
(or)
@Autowired
private RepositoryService repositoryService;
BpmnModelInstance bpmnModelInstance = repositoryService.getBpmnModelInstance(execution.getProcessDefinitionId());
//or
BpmnModelInstance bpmnModelInstance = repositoryService.getResourceAsStream(deploymentId, resourceName);
Dependency:
<dependency>
<groupId>org.camunda.bpm.model</groupId>
<artifactId>camunda-bpmn-model</artifactId>
<version>7.13.0</version>
</dependency>
Reference: https://docs.camunda.org/manual/7.13/user-guide/model-api/bpmn-model-api/read-a-model/