public Object execute(CommandContext commandContext) { ensureNotNull("caseInstanceId", caseInstanceId); // Check if case instance is still running HistoricCaseInstance instance = commandContext .getHistoricCaseInstanceManager() .findHistoricCaseInstance(caseInstanceId); ensureNotNull("No historic case instance found with id: " + caseInstanceId, "instance", instance); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkDeleteHistoricCaseInstance(instance); } ensureNotNull("Case instance is still running, cannot delete historic case instance: " + caseInstanceId, "instance.getCloseTime()", instance.getCloseTime()); commandContext .getHistoricCaseInstanceManager() .deleteHistoricCaseInstancesByIds(Arrays.asList(caseInstanceId)); return null; }
public Object execute(CommandContext commandContext) { ensureNotNull("caseInstanceId", caseInstanceId); // Check if case instance is still running HistoricCaseInstance instance = commandContext .getHistoricCaseInstanceManager() .findHistoricCaseInstance(caseInstanceId); ensureNotNull("No historic case instance found with id: " + caseInstanceId, "instance", instance); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkDeleteHistoricCaseInstance(instance); } ensureNotNull("Case instance is still running, cannot delete historic case instance: " + caseInstanceId, "instance.getCloseTime()", instance.getCloseTime()); commandContext .getHistoricCaseInstanceManager() .deleteHistoricCaseInstancesByIds(Arrays.asList(caseInstanceId)); return null; }
public Object execute(CommandContext commandContext) { ensureNotNull("caseInstanceId", caseInstanceId); // Check if case instance is still running HistoricCaseInstance instance = commandContext .getHistoricCaseInstanceManager() .findHistoricCaseInstance(caseInstanceId); ensureNotNull("No historic case instance found with id: " + caseInstanceId, "instance", instance); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkDeleteHistoricCaseInstance(instance); } ensureNotNull("Case instance is still running, cannot delete historic case instance: " + caseInstanceId, "instance.getCloseTime()", instance.getCloseTime()); commandContext .getHistoricCaseInstanceManager() .deleteHistoricCaseInstancesByIds(Arrays.asList(caseInstanceId)); return null; }