public void deleteHistoricVariableInstanceByVariableInstanceId(String historicVariableInstanceId) { if (isHistoryEnabled()) { HistoricVariableInstanceEntity historicVariableInstance = findHistoricVariableInstanceByVariableInstanceId(historicVariableInstanceId); if (historicVariableInstance != null) { historicVariableInstance.delete(); } } }
public void deleteHistoricVariableInstanceByVariableInstanceId(String historicVariableInstanceId) { if (isHistoryEnabled()) { HistoricVariableInstanceEntity historicVariableInstance = findHistoricVariableInstanceByVariableInstanceId(historicVariableInstanceId); if (historicVariableInstance != null) { historicVariableInstance.delete(); } } }
@Override public Void execute(CommandContext commandContext) { ensureNotEmpty(BadUserRequestException.class,"variableInstanceId", variableInstanceId); HistoricVariableInstanceEntity variable = commandContext.getHistoricVariableInstanceManager().findHistoricVariableInstanceByVariableInstanceId(variableInstanceId); ensureNotNull(NotFoundException.class, "No historic variable instance found with id: " + variableInstanceId, "variable", variable); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkDeleteHistoricVariableInstance(variable); } commandContext .getHistoricDetailManager() .deleteHistoricDetailsByVariableInstanceId(variableInstanceId); commandContext .getHistoricVariableInstanceManager() .deleteHistoricVariableInstanceByVariableInstanceId(variableInstanceId); return null; } }
@Override public Void execute(CommandContext commandContext) { ensureNotEmpty(BadUserRequestException.class,"variableInstanceId", variableInstanceId); HistoricVariableInstanceEntity variable = commandContext.getHistoricVariableInstanceManager().findHistoricVariableInstanceByVariableInstanceId(variableInstanceId); ensureNotNull(NotFoundException.class, "No historic variable instance found with id: " + variableInstanceId, "variable", variable); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkDeleteHistoricVariableInstance(variable); } commandContext .getHistoricDetailManager() .deleteHistoricDetailsByVariableInstanceId(variableInstanceId); commandContext .getHistoricVariableInstanceManager() .deleteHistoricVariableInstanceByVariableInstanceId(variableInstanceId); return null; } }
public Void execute(CommandContext commandContext) { ExecutionEntity execution = commandContext.getExecutionManager().findExecutionById(processInstanceId); VariableInstanceEntity varInstance = (VariableInstanceEntity) execution.getVariableInstance(VARIABLE_NAME); HistoricVariableInstanceEntity historicVariableInstance = commandContext.getHistoricVariableInstanceManager() .findHistoricVariableInstanceByVariableInstanceId(varInstance.getId()); historicByteArrayId[0] = historicVariableInstance.getByteArrayValueId(); return null; } });
public Void execute(CommandContext commandContext) { ExecutionEntity execution = commandContext.getExecutionManager().findExecutionById(processInstanceId); VariableInstanceEntity varInstance = (VariableInstanceEntity) execution.getVariableInstance(VARIABLE_NAME); HistoricVariableInstanceEntity historicVariableInstance = commandContext.getHistoricVariableInstanceManager() .findHistoricVariableInstanceByVariableInstanceId(varInstance.getId()); historicByteArrayId[0] = historicVariableInstance.getByteArrayValueId(); return null; } });