public long executeCount(CommandContext commandContext) { checkQueryOk(); return commandContext .getHistoricDetailManager() .findHistoricDetailCountByQueryCriteria(this); }
public long executeCount(CommandContext commandContext) { checkQueryOk(); return commandContext .getHistoricDetailManager() .findHistoricDetailCountByQueryCriteria(this); }
public Void execute(CommandContext commandContext) { Map<String, Object> formProperties = new HashMap<String, Object>(); formProperties.put("formProp1", "value1"); ProcessInstance processInstance = new SubmitStartFormCmd(processDefinitionId, null, formProperties).execute(commandContext); // two historic details should be in cache: one form property and one variable update commandContext.getHistoricDetailManager().deleteHistoricDetailsByProcessInstanceIds(Arrays.asList(processInstance.getId())); 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; } }
@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 List<HistoricDetail> executeList(CommandContext commandContext, Page page) { checkQueryOk(); List<HistoricDetail> historicDetails = commandContext .getHistoricDetailManager() .findHistoricDetailsByQueryCriteria(this, page); if (historicDetails!=null) { for (HistoricDetail historicDetail: historicDetails) { if (historicDetail instanceof HistoricDetailVariableInstanceUpdateEntity) { HistoricDetailVariableInstanceUpdateEntity entity = (HistoricDetailVariableInstanceUpdateEntity) historicDetail; if (shouldFetchValue(entity)) { try { entity.getTypedValue(isCustomObjectDeserializationEnabled); } catch(Exception t) { // do not fail if one of the variables fails to load LOG.exceptionWhileGettingValueForVariable(t); } } } } } return historicDetails; }
public List<HistoricDetail> executeList(CommandContext commandContext, Page page) { checkQueryOk(); List<HistoricDetail> historicDetails = commandContext .getHistoricDetailManager() .findHistoricDetailsByQueryCriteria(this, page); if (historicDetails!=null) { for (HistoricDetail historicDetail: historicDetails) { if (historicDetail instanceof HistoricDetailVariableInstanceUpdateEntity) { HistoricDetailVariableInstanceUpdateEntity entity = (HistoricDetailVariableInstanceUpdateEntity) historicDetail; if (shouldFetchValue(entity)) { try { entity.getTypedValue(isCustomObjectDeserializationEnabled); } catch(Exception t) { // do not fail if one of the variables fails to load LOG.exceptionWhileGettingValueForVariable(t); } } } } } return historicDetails; }
DbOperation deleteDetails = commandContext.getHistoricDetailManager() .deleteHistoricDetailsByRemovalTime(removalTime, minuteFrom, minuteTo, batchSize);
DbOperation deleteDetails = commandContext.getHistoricDetailManager() .deleteHistoricDetailsByRemovalTime(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,"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; } }
.addRemovalTimeToVariableInstancesByRootProcessInstanceId(rootProcessInstanceId, removalTime); commandContext.getHistoricDetailManager() .addRemovalTimeToDetailsByRootProcessInstanceId(rootProcessInstanceId, removalTime);
.addRemovalTimeToVariableInstancesByRootProcessInstanceId(rootProcessInstanceId, removalTime); commandContext.getHistoricDetailManager() .addRemovalTimeToDetailsByRootProcessInstanceId(rootProcessInstanceId, removalTime);
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); } } }
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); } } }
public void deleteHistoricProcessInstanceByIds(List<String> processInstanceIds) { CommandContext commandContext = Context.getCommandContext(); commandContext.getHistoricDetailManager().deleteHistoricDetailsByProcessInstanceIds(processInstanceIds); commandContext.getHistoricVariableInstanceManager().deleteHistoricVariableInstanceByProcessInstanceIds(processInstanceIds); commandContext.getCommentManager().deleteCommentsByProcessInstanceIds(processInstanceIds); commandContext.getAttachmentManager().deleteAttachmentsByProcessInstanceIds(processInstanceIds); commandContext.getHistoricTaskInstanceManager().deleteHistoricTaskInstancesByProcessInstanceIds(processInstanceIds, false); commandContext.getHistoricActivityInstanceManager().deleteHistoricActivityInstancesByProcessInstanceIds(processInstanceIds); commandContext.getHistoricIncidentManager().deleteHistoricIncidentsByProcessInstanceIds(processInstanceIds); commandContext.getHistoricJobLogManager().deleteHistoricJobLogsByProcessInstanceIds(processInstanceIds); commandContext.getHistoricExternalTaskLogManager().deleteHistoricExternalTaskLogsByProcessInstanceIds(processInstanceIds); commandContext.getDbEntityManager().deletePreserveOrder(HistoricProcessInstanceEntity.class, "deleteHistoricProcessInstances", processInstanceIds); }
public void deleteHistoricProcessInstanceByIds(List<String> processInstanceIds) { CommandContext commandContext = Context.getCommandContext(); commandContext.getHistoricDetailManager().deleteHistoricDetailsByProcessInstanceIds(processInstanceIds); commandContext.getHistoricVariableInstanceManager().deleteHistoricVariableInstanceByProcessInstanceIds(processInstanceIds); commandContext.getCommentManager().deleteCommentsByProcessInstanceIds(processInstanceIds); commandContext.getAttachmentManager().deleteAttachmentsByProcessInstanceIds(processInstanceIds); commandContext.getHistoricTaskInstanceManager().deleteHistoricTaskInstancesByProcessInstanceIds(processInstanceIds, false); commandContext.getHistoricActivityInstanceManager().deleteHistoricActivityInstancesByProcessInstanceIds(processInstanceIds); commandContext.getHistoricIncidentManager().deleteHistoricIncidentsByProcessInstanceIds(processInstanceIds); commandContext.getHistoricJobLogManager().deleteHistoricJobLogsByProcessInstanceIds(processInstanceIds); commandContext.getHistoricExternalTaskLogManager().deleteHistoricExternalTaskLogsByProcessInstanceIds(processInstanceIds); commandContext.getDbEntityManager().deletePreserveOrder(HistoricProcessInstanceEntity.class, "deleteHistoricProcessInstances", processInstanceIds); }
public long executeCount(CommandContext commandContext) { checkQueryOk(); return commandContext .getHistoricDetailManager() .findHistoricDetailCountByQueryCriteria(this); }
public Void execute(CommandContext commandContext) { Map<String, Object> formProperties = new HashMap<String, Object>(); formProperties.put("formProp1", "value1"); ProcessInstance processInstance = new SubmitStartFormCmd(processDefinitionId, null, formProperties).execute(commandContext); // two historic details should be in cache: one form property and one variable update commandContext.getHistoricDetailManager().deleteHistoricDetailsByProcessInstanceIds(Arrays.asList(processInstance.getId())); return null; } });
public void deleteHistoricProcessInstanceByIds(List<String> processInstanceIds) { CommandContext commandContext = Context.getCommandContext(); commandContext.getHistoricDetailManager().deleteHistoricDetailsByProcessInstanceIds(processInstanceIds); commandContext.getHistoricVariableInstanceManager().deleteHistoricVariableInstanceByProcessInstanceIds(processInstanceIds); commandContext.getCommentManager().deleteCommentsByProcessInstanceIds(processInstanceIds); commandContext.getAttachmentManager().deleteAttachmentsByProcessInstanceIds(processInstanceIds); commandContext.getHistoricTaskInstanceManager().deleteHistoricTaskInstancesByProcessInstanceIds(processInstanceIds, false); commandContext.getHistoricActivityInstanceManager().deleteHistoricActivityInstancesByProcessInstanceIds(processInstanceIds); commandContext.getHistoricIncidentManager().deleteHistoricIncidentsByProcessInstanceIds(processInstanceIds); commandContext.getHistoricJobLogManager().deleteHistoricJobLogsByProcessInstanceIds(processInstanceIds); commandContext.getHistoricExternalTaskLogManager().deleteHistoricExternalTaskLogsByProcessInstanceIds(processInstanceIds); commandContext.getDbEntityManager().deletePreserveOrder(HistoricProcessInstanceEntity.class, "deleteHistoricProcessInstances", processInstanceIds); }