Skip to main content

Repository Service

It is also possible to access the BPMN model instance by the process definition id using the Repository Service, as the following incomplete test sample code shows.

public void testRepositoryService() {
runtimeService.startProcessInstanceByKey(PROCESS_KEY);
String processDefinitionId = repositoryService.createProcessDefinitionQuery()
.processDefinitionKey(PROCESS_KEY).singleResult().getId();
BpmnModelInstance modelInstance = repositoryService.getBpmnModelInstance(processDefinitionId);
}