Search in sources :

Example 1 with CaseDefinitionManager

use of org.camunda.bpm.engine.impl.cmmn.entity.repository.CaseDefinitionManager in project camunda-bpm-platform by camunda.

the class ProcessApplicationManager method getDeployedCaseDefinitionArtifacts.

protected List<CaseDefinition> getDeployedCaseDefinitionArtifacts(DeploymentEntity deployment) {
    CommandContext commandContext = Context.getCommandContext();
    // in case deployment was created by this command
    List<CaseDefinition> entities = deployment.getDeployedCaseDefinitions();
    if (entities == null) {
        String deploymentId = deployment.getId();
        CaseDefinitionManager caseDefinitionManager = commandContext.getCaseDefinitionManager();
        return caseDefinitionManager.findCaseDefinitionByDeploymentId(deploymentId);
    }
    return entities;
}
Also used : CaseDefinitionManager(org.camunda.bpm.engine.impl.cmmn.entity.repository.CaseDefinitionManager) CommandContext(org.camunda.bpm.engine.impl.interceptor.CommandContext) CaseDefinition(org.camunda.bpm.engine.repository.CaseDefinition)

Aggregations

CaseDefinitionManager (org.camunda.bpm.engine.impl.cmmn.entity.repository.CaseDefinitionManager)1 CommandContext (org.camunda.bpm.engine.impl.interceptor.CommandContext)1 CaseDefinition (org.camunda.bpm.engine.repository.CaseDefinition)1