public void deleteHistoricVariableInstanceByVariableInstanceId(String historicVariableInstanceId) { if (isHistoryEnabled()) { HistoricVariableInstanceEntity historicVariableInstance = findHistoricVariableInstanceByVariableInstanceId(historicVariableInstanceId); if (historicVariableInstance != null) { historicVariableInstance.delete(); } } }
@SuppressWarnings("unchecked") public List<HistoricVariableInstance> findHistoricVariableInstancesByQueryCriteria(HistoricVariableInstanceQueryImpl historicProcessVariableQuery, Page page) { configureQuery(historicProcessVariableQuery); return getDbEntityManager().selectList("selectHistoricVariableInstanceByQueryCriteria", historicProcessVariableQuery, page); }
public void deleteHistoricVariableInstancesByTaskProcessInstanceIds(List<String> historicProcessInstanceIds) { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("taskProcessInstanceIds", historicProcessInstanceIds); deleteHistoricVariableInstances(parameters); }
@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,"processInstanceId", processInstanceId); HistoricProcessInstanceEntity instance = commandContext.getHistoricProcessInstanceManager().findHistoricProcessInstance(processInstanceId); ensureNotNull(NotFoundException.class, "No historic process instance found with id: " + processInstanceId, "instance", instance); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkDeleteHistoricVariableInstancesByProcessInstance(instance); } commandContext.getHistoricDetailManager().deleteHistoricDetailsByProcessInstanceIds(Arrays.asList(processInstanceId)); commandContext.getHistoricVariableInstanceManager().deleteHistoricVariableInstanceByProcessInstanceIds(Arrays.asList(processInstanceId)); 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 deleteHistoricCaseInstancesByIds(List<String> historicCaseInstanceIds) { if (isHistoryEnabled()) { getHistoricDetailManager().deleteHistoricDetailsByCaseInstanceIds(historicCaseInstanceIds); getHistoricVariableInstanceManager().deleteHistoricVariableInstancesByCaseInstanceIds(historicCaseInstanceIds); getHistoricCaseActivityInstanceManager().deleteHistoricCaseActivityInstancesByCaseInstanceIds(historicCaseInstanceIds); getHistoricTaskInstanceManager().deleteHistoricTaskInstancesByCaseInstanceIds(historicCaseInstanceIds); getDbEntityManager().delete(HistoricCaseInstanceEntity.class, "deleteHistoricCaseInstancesByIds", historicCaseInstanceIds); } }
public void deleteHistoricVariableInstanceByCaseInstanceId(String historicCaseInstanceId) { deleteHistoricVariableInstancesByProcessCaseInstanceId(null, historicCaseInstanceId); }
public void deleteHistoricTaskInstanceById(final String taskId) { if (isHistoryEnabled()) { HistoricTaskInstanceEntity historicTaskInstance = findHistoricTaskInstanceById(taskId); if (historicTaskInstance != null) { CommandContext commandContext = Context.getCommandContext(); commandContext .getHistoricDetailManager() .deleteHistoricDetailsByTaskId(taskId); commandContext .getHistoricVariableInstanceManager() .deleteHistoricVariableInstancesByTaskId(taskId); commandContext .getCommentManager() .deleteCommentsByTaskId(taskId); commandContext .getAttachmentManager() .deleteAttachmentsByTaskId(taskId); commandContext .getHistoricIdentityLinkManager() .deleteHistoricIdentityLinksLogByTaskId(taskId); getDbEntityManager().delete(historicTaskInstance); } } }
.addRemovalTimeToVariableInstancesByRootProcessInstanceId(rootProcessInstanceId, removalTime);
.deleteHistoricVariableInstancesByRemovalTime(removalTime, minuteFrom, minuteTo, batchSize);
@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,"processInstanceId", processInstanceId); HistoricProcessInstanceEntity instance = commandContext.getHistoricProcessInstanceManager().findHistoricProcessInstance(processInstanceId); ensureNotNull(NotFoundException.class, "No historic process instance found with id: " + processInstanceId, "instance", instance); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkDeleteHistoricVariableInstancesByProcessInstance(instance); } commandContext.getHistoricDetailManager().deleteHistoricDetailsByProcessInstanceIds(Arrays.asList(processInstanceId)); commandContext.getHistoricVariableInstanceManager().deleteHistoricVariableInstanceByProcessInstanceIds(Arrays.asList(processInstanceId)); 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 deleteHistoricCaseInstancesByIds(List<String> historicCaseInstanceIds) { if (isHistoryEnabled()) { getHistoricDetailManager().deleteHistoricDetailsByCaseInstanceIds(historicCaseInstanceIds); getHistoricVariableInstanceManager().deleteHistoricVariableInstancesByCaseInstanceIds(historicCaseInstanceIds); getHistoricCaseActivityInstanceManager().deleteHistoricCaseActivityInstancesByCaseInstanceIds(historicCaseInstanceIds); getHistoricTaskInstanceManager().deleteHistoricTaskInstancesByCaseInstanceIds(historicCaseInstanceIds); getDbEntityManager().delete(HistoricCaseInstanceEntity.class, "deleteHistoricCaseInstancesByIds", historicCaseInstanceIds); } }
public void deleteHistoricVariableInstanceByCaseInstanceId(String historicCaseInstanceId) { deleteHistoricVariableInstancesByProcessCaseInstanceId(null, historicCaseInstanceId); }
public void deleteHistoricTaskInstanceById(final String taskId) { if (isHistoryEnabled()) { HistoricTaskInstanceEntity historicTaskInstance = findHistoricTaskInstanceById(taskId); if (historicTaskInstance != null) { CommandContext commandContext = Context.getCommandContext(); commandContext .getHistoricDetailManager() .deleteHistoricDetailsByTaskId(taskId); commandContext .getHistoricVariableInstanceManager() .deleteHistoricVariableInstancesByTaskId(taskId); commandContext .getCommentManager() .deleteCommentsByTaskId(taskId); commandContext .getAttachmentManager() .deleteAttachmentsByTaskId(taskId); commandContext .getHistoricIdentityLinkManager() .deleteHistoricIdentityLinksLogByTaskId(taskId); getDbEntityManager().delete(historicTaskInstance); } } }
.addRemovalTimeToVariableInstancesByRootProcessInstanceId(rootProcessInstanceId, removalTime);
.deleteHistoricVariableInstancesByRemovalTime(removalTime, minuteFrom, minuteTo, batchSize);
@SuppressWarnings("unchecked") public List<HistoricVariableInstance> findHistoricVariableInstancesByQueryCriteria(HistoricVariableInstanceQueryImpl historicProcessVariableQuery, Page page) { configureQuery(historicProcessVariableQuery); return getDbEntityManager().selectList("selectHistoricVariableInstanceByQueryCriteria", historicProcessVariableQuery, page); }