/** * Returns the cached version if exists; does not update the entity from the database in that case */ protected DecisionDefinitionEntity loadDecisionDefinition(String decisionDefinitionId) { ProcessEngineConfigurationImpl configuration = Context.getProcessEngineConfiguration(); DeploymentCache deploymentCache = configuration.getDeploymentCache(); DecisionDefinitionEntity decisionDefinition = deploymentCache.findDecisionDefinitionFromCache(decisionDefinitionId); if (decisionDefinition == null) { CommandContext commandContext = Context.getCommandContext(); DecisionDefinitionManager decisionDefinitionManager = commandContext.getDecisionDefinitionManager(); decisionDefinition = decisionDefinitionManager.findDecisionDefinitionById(decisionDefinitionId); if (decisionDefinition != null) { decisionDefinition = deploymentCache.resolveDecisionDefinition(decisionDefinition); } } return decisionDefinition; }
/** * Returns the cached version if exists; does not update the entity from the database in that case */ protected DecisionDefinitionEntity loadDecisionDefinition(String decisionDefinitionId) { ProcessEngineConfigurationImpl configuration = Context.getProcessEngineConfiguration(); DeploymentCache deploymentCache = configuration.getDeploymentCache(); DecisionDefinitionEntity decisionDefinition = deploymentCache.findDecisionDefinitionFromCache(decisionDefinitionId); if (decisionDefinition == null) { CommandContext commandContext = Context.getCommandContext(); DecisionDefinitionManager decisionDefinitionManager = commandContext.getDecisionDefinitionManager(); decisionDefinition = decisionDefinitionManager.findDecisionDefinitionById(decisionDefinitionId); if (decisionDefinition != null) { decisionDefinition = deploymentCache.resolveDecisionDefinition(decisionDefinition); } } return decisionDefinition; }
/** * Returns the cached version if exists; does not update the entity from the database in that case */ protected DecisionDefinitionEntity loadDecisionDefinition(String decisionDefinitionId) { ProcessEngineConfigurationImpl configuration = Context.getProcessEngineConfiguration(); DeploymentCache deploymentCache = configuration.getDeploymentCache(); DecisionDefinitionEntity decisionDefinition = deploymentCache.findDecisionDefinitionFromCache(decisionDefinitionId); if (decisionDefinition == null) { CommandContext commandContext = Context.getCommandContext(); DecisionDefinitionManager decisionDefinitionManager = commandContext.getDecisionDefinitionManager(); decisionDefinition = decisionDefinitionManager.findDecisionDefinitionById(decisionDefinitionId); if (decisionDefinition != null) { decisionDefinition = deploymentCache.resolveDecisionDefinition(decisionDefinition); } } return decisionDefinition; }