@Override public DecisionDefinitionEntity findLatestDefinitionById(String id) { return findDecisionDefinitionById(id); }
@Override public DecisionDefinitionEntity findLatestDefinitionById(String id) { return findDecisionDefinitionById(id); }
protected DecisionDefinitionEntity findLatestDecisionDefinitionById(String decisionDefinitionId) { return Context.getCommandContext().getDecisionDefinitionManager().findDecisionDefinitionById(decisionDefinitionId); }
protected DecisionDefinitionEntity findLatestDecisionDefinitionById(String decisionDefinitionId) { return Context.getCommandContext().getDecisionDefinitionManager().findDecisionDefinitionById(decisionDefinitionId); }
protected DecisionDefinitionEntity findLatestDecisionDefinitionById(String decisionDefinitionId) { return Context.getCommandContext().getDecisionDefinitionManager().findDecisionDefinitionById(decisionDefinitionId); }
protected DecisionDefinitionEntity findLatestDecisionDefinitionById(String decisionDefinitionId) { return Context.getCommandContext().getDecisionDefinitionManager().findDecisionDefinitionById(decisionDefinitionId); }
public Void execute(CommandContext commandContext) { checkAuthorization(commandContext); ensureNotNull(BadUserRequestException.class, "decisionDefinitionId", decisionDefinitionId); if (historyTimeToLive != null) { ensureGreaterThanOrEqual(BadUserRequestException.class, "", "historyTimeToLive", historyTimeToLive, 0); } DecisionDefinitionEntity decisionDefinitionEntity = commandContext.getDecisionDefinitionManager().findDecisionDefinitionById(decisionDefinitionId); decisionDefinitionEntity.setHistoryTimeToLive(historyTimeToLive); return null; }
public Void execute(CommandContext commandContext) { checkAuthorization(commandContext); ensureNotNull(BadUserRequestException.class, "decisionDefinitionId", decisionDefinitionId); if (historyTimeToLive != null) { ensureGreaterThanOrEqual(BadUserRequestException.class, "", "historyTimeToLive", historyTimeToLive, 0); } DecisionDefinitionEntity decisionDefinitionEntity = commandContext.getDecisionDefinitionManager().findDecisionDefinitionById(decisionDefinitionId); decisionDefinitionEntity.setHistoryTimeToLive(historyTimeToLive); return null; }
/** * 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; }
@Override public Object execute(CommandContext commandContext) { ensureNotNull("decisionDefinitionId", decisionDefinitionId); DecisionDefinitionEntity decisionDefinition = commandContext .getDecisionDefinitionManager() .findDecisionDefinitionById(decisionDefinitionId); ensureNotNull("No decision definition found with id: " + decisionDefinitionId, "decisionDefinition", decisionDefinition); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkDeleteHistoricDecisionInstance(decisionDefinition.getKey()); } commandContext .getHistoricDecisionInstanceManager() .deleteHistoricDecisionInstancesByDecisionDefinitionId(decisionDefinitionId); return null; }
@Override public DecisionDefinitionEntity findLatestDefinitionById(String id) { return findDecisionDefinitionById(id); }
@Override public Object execute(CommandContext commandContext) { ensureNotNull("decisionDefinitionId", decisionDefinitionId); DecisionDefinitionEntity decisionDefinition = commandContext .getDecisionDefinitionManager() .findDecisionDefinitionById(decisionDefinitionId); ensureNotNull("No decision definition found with id: " + decisionDefinitionId, "decisionDefinition", decisionDefinition); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkDeleteHistoricDecisionInstance(decisionDefinition.getKey()); } commandContext .getHistoricDecisionInstanceManager() .deleteHistoricDecisionInstancesByDecisionDefinitionId(decisionDefinitionId); return null; }
protected DecisionDefinitionEntity findLatestDecisionDefinitionById(String decisionDefinitionId) { return Context.getCommandContext().getDecisionDefinitionManager().findDecisionDefinitionById(decisionDefinitionId); }
protected DecisionDefinitionEntity findLatestDecisionDefinitionById(String decisionDefinitionId) { return Context.getCommandContext().getDecisionDefinitionManager().findDecisionDefinitionById(decisionDefinitionId); }
public Void execute(CommandContext commandContext) { checkAuthorization(commandContext); ensureNotNull(BadUserRequestException.class, "decisionDefinitionId", decisionDefinitionId); if (historyTimeToLive != null) { ensureGreaterThanOrEqual(BadUserRequestException.class, "", "historyTimeToLive", historyTimeToLive, 0); } DecisionDefinitionEntity decisionDefinitionEntity = commandContext.getDecisionDefinitionManager().findDecisionDefinitionById(decisionDefinitionId); decisionDefinitionEntity.setHistoryTimeToLive(historyTimeToLive); return null; }
/** * 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; }
@Override public Object execute(CommandContext commandContext) { ensureNotNull("decisionDefinitionId", decisionDefinitionId); DecisionDefinitionEntity decisionDefinition = commandContext .getDecisionDefinitionManager() .findDecisionDefinitionById(decisionDefinitionId); ensureNotNull("No decision definition found with id: " + decisionDefinitionId, "decisionDefinition", decisionDefinition); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkDeleteHistoricDecisionInstance(decisionDefinition.getKey()); } commandContext .getHistoricDecisionInstanceManager() .deleteHistoricDecisionInstancesByDecisionDefinitionId(decisionDefinitionId); return null; }