Repository Service

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

public void testRepositoryService() {
  String caseDefinitionId = repositoryService.createCaseDefinitionQuery()
    .caseDefinitionKey(CASE_KEY).singleResult().getId();
  CmmnModelInstance modelInstance = repositoryService
    .getCmmnModelInstance(caseDefinitionId);
}

On this Page: