/** * Returns the cached version if exists; does not update the entity from the database in that case */ protected CaseDefinitionEntity loadCaseDefinition(String caseDefinitionId) { ProcessEngineConfigurationImpl configuration = Context.getProcessEngineConfiguration(); DeploymentCache deploymentCache = configuration.getDeploymentCache(); CaseDefinitionEntity caseDefinition = deploymentCache.findCaseDefinitionFromCache(caseDefinitionId); if (caseDefinition == null) { CommandContext commandContext = Context.getCommandContext(); CaseDefinitionManager caseDefinitionManager = commandContext.getCaseDefinitionManager(); caseDefinition = caseDefinitionManager.findCaseDefinitionById(caseDefinitionId); if (caseDefinition != null) { caseDefinition = deploymentCache.resolveCaseDefinition(caseDefinition); } } return caseDefinition; }
/** * Returns the cached version if exists; does not update the entity from the database in that case */ protected CaseDefinitionEntity loadCaseDefinition(String caseDefinitionId) { ProcessEngineConfigurationImpl configuration = Context.getProcessEngineConfiguration(); DeploymentCache deploymentCache = configuration.getDeploymentCache(); CaseDefinitionEntity caseDefinition = deploymentCache.findCaseDefinitionFromCache(caseDefinitionId); if (caseDefinition == null) { CommandContext commandContext = Context.getCommandContext(); CaseDefinitionManager caseDefinitionManager = commandContext.getCaseDefinitionManager(); caseDefinition = caseDefinitionManager.findCaseDefinitionById(caseDefinitionId); if (caseDefinition != null) { caseDefinition = deploymentCache.resolveCaseDefinition(caseDefinition); } } return caseDefinition; }
/** * Returns the cached version if exists; does not update the entity from the database in that case */ protected CaseDefinitionEntity loadCaseDefinition(String caseDefinitionId) { ProcessEngineConfigurationImpl configuration = Context.getProcessEngineConfiguration(); DeploymentCache deploymentCache = configuration.getDeploymentCache(); CaseDefinitionEntity caseDefinition = deploymentCache.findCaseDefinitionFromCache(caseDefinitionId); if (caseDefinition == null) { CommandContext commandContext = Context.getCommandContext(); CaseDefinitionManager caseDefinitionManager = commandContext.getCaseDefinitionManager(); caseDefinition = caseDefinitionManager.findCaseDefinitionById(caseDefinitionId); if (caseDefinition != null) { caseDefinition = deploymentCache.resolveCaseDefinition(caseDefinition); } } return caseDefinition; }