public Void execute(CommandContext commandContext) { commandContext.getHistoricIncidentManager() .deleteHistoricIncidentsByProcessInstanceIds(Collections.singletonList(processInstanceId)); return null; } });
protected void addRemovalTimeToHistoricIncidents(HistoricBatchEntity historicBatch) { Date removalTime = historicBatch.getRemovalTime(); if (removalTime != null) { Context.getCommandContext() .getHistoricIncidentManager() .addRemovalTimeToHistoricIncidentsByBatchId(historicBatch.getId(), removalTime); } }
@SuppressWarnings("unchecked") public List<HistoricIncident> findHistoricIncidentByQueryCriteria(HistoricIncidentQueryImpl query, Page page) { configureQuery(query); return getDbEntityManager().selectList("selectHistoricIncidentByQueryCriteria", query, page); }
public void delete() { HistoricIncidentManager historicIncidentManager = Context.getCommandContext().getHistoricIncidentManager(); historicIncidentManager.deleteHistoricIncidentsByJobDefinitionId(seedJobDefinitionId); historicIncidentManager.deleteHistoricIncidentsByJobDefinitionId(monitorJobDefinitionId); historicIncidentManager.deleteHistoricIncidentsByJobDefinitionId(batchJobDefinitionId); HistoricJobLogManager historicJobLogManager = Context.getCommandContext().getHistoricJobLogManager(); historicJobLogManager.deleteHistoricJobLogsByJobDefinitionId(seedJobDefinitionId); historicJobLogManager.deleteHistoricJobLogsByJobDefinitionId(monitorJobDefinitionId); historicJobLogManager.deleteHistoricJobLogsByJobDefinitionId(batchJobDefinitionId); Context.getCommandContext().getHistoricBatchManager().delete(this); }
public List<HistoricIncident> executeList(CommandContext commandContext, Page page) { checkQueryOk(); return commandContext .getHistoricIncidentManager() .findHistoricIncidentByQueryCriteria(this, page); }
public long executeCount(CommandContext commandContext) { checkQueryOk(); return commandContext .getHistoricIncidentManager() .findHistoricIncidentCountByQueryCriteria(this); }
public void deleteHistoricBatchesByIds(List<String> historicBatchIds) { CommandContext commandContext = Context.getCommandContext(); commandContext.getHistoricIncidentManager().deleteHistoricIncidentsByBatchId(historicBatchIds); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByBatchIds(historicBatchIds); getDbEntityManager().deletePreserveOrder(HistoricBatchEntity.class, "deleteHistoricBatchByIds", historicBatchIds); }
/** * Cascades the deletion of a process definition to the history, deletes the history. * * @param processDefinitionId the process definition id */ protected void cascadeDeleteHistoryForProcessDefinition(String processDefinitionId) { // remove historic incidents which are not referenced to a process instance getHistoricIncidentManager().deleteHistoricIncidentsByProcessDefinitionId(processDefinitionId); // remove historic identity links which are not reference to a process instance getHistoricIdentityLinkManager().deleteHistoricIdentityLinksLogByProcessDefinitionId(processDefinitionId); // remove historic job log entries not related to a process instance getHistoricJobLogManager().deleteHistoricJobLogsByProcessDefinitionId(processDefinitionId); }
.addRemovalTimeToIncidentsByRootProcessInstanceId(rootProcessInstanceId, removalTime);
.deleteHistoricIncidentsByRemovalTime(removalTime, minuteFrom, minuteTo, batchSize);
public void delete() { HistoricIncidentManager historicIncidentManager = Context.getCommandContext().getHistoricIncidentManager(); historicIncidentManager.deleteHistoricIncidentsByJobDefinitionId(seedJobDefinitionId); historicIncidentManager.deleteHistoricIncidentsByJobDefinitionId(monitorJobDefinitionId); historicIncidentManager.deleteHistoricIncidentsByJobDefinitionId(batchJobDefinitionId); HistoricJobLogManager historicJobLogManager = Context.getCommandContext().getHistoricJobLogManager(); historicJobLogManager.deleteHistoricJobLogsByJobDefinitionId(seedJobDefinitionId); historicJobLogManager.deleteHistoricJobLogsByJobDefinitionId(monitorJobDefinitionId); historicJobLogManager.deleteHistoricJobLogsByJobDefinitionId(batchJobDefinitionId); Context.getCommandContext().getHistoricBatchManager().delete(this); }
public List<HistoricIncident> executeList(CommandContext commandContext, Page page) { checkQueryOk(); return commandContext .getHistoricIncidentManager() .findHistoricIncidentByQueryCriteria(this, page); }
public long executeCount(CommandContext commandContext) { checkQueryOk(); return commandContext .getHistoricIncidentManager() .findHistoricIncidentCountByQueryCriteria(this); }
public void deleteHistoricBatchesByIds(List<String> historicBatchIds) { CommandContext commandContext = Context.getCommandContext(); commandContext.getHistoricIncidentManager().deleteHistoricIncidentsByBatchId(historicBatchIds); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByBatchIds(historicBatchIds); getDbEntityManager().deletePreserveOrder(HistoricBatchEntity.class, "deleteHistoricBatchByIds", historicBatchIds); }
/** * Cascades the deletion of a process definition to the history, deletes the history. * * @param processDefinitionId the process definition id */ protected void cascadeDeleteHistoryForProcessDefinition(String processDefinitionId) { // remove historic incidents which are not referenced to a process instance getHistoricIncidentManager().deleteHistoricIncidentsByProcessDefinitionId(processDefinitionId); // remove historic identity links which are not reference to a process instance getHistoricIdentityLinkManager().deleteHistoricIdentityLinksLogByProcessDefinitionId(processDefinitionId); // remove historic job log entries not related to a process instance getHistoricJobLogManager().deleteHistoricJobLogsByProcessDefinitionId(processDefinitionId); }
.addRemovalTimeToIncidentsByRootProcessInstanceId(rootProcessInstanceId, removalTime);
.deleteHistoricIncidentsByRemovalTime(removalTime, minuteFrom, minuteTo, batchSize);
@SuppressWarnings("unchecked") public List<HistoricIncident> findHistoricIncidentByQueryCriteria(HistoricIncidentQueryImpl query, Page page) { configureQuery(query); return getDbEntityManager().selectList("selectHistoricIncidentByQueryCriteria", query, page); }
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 delete(boolean cascadeToHistory) { CommandContext commandContext = Context.getCommandContext(); deleteSeedJob(); deleteMonitorJob(); getBatchJobHandler().deleteJobs(this); JobDefinitionManager jobDefinitionManager = commandContext.getJobDefinitionManager(); jobDefinitionManager.delete(getSeedJobDefinition()); jobDefinitionManager.delete(getMonitorJobDefinition()); jobDefinitionManager.delete(getBatchJobDefinition()); commandContext.getBatchManager().delete(this); configuration.deleteByteArrayValue(); fireHistoricEndEvent(); if (cascadeToHistory) { HistoricIncidentManager historicIncidentManager = commandContext.getHistoricIncidentManager(); historicIncidentManager.deleteHistoricIncidentsByJobDefinitionId(seedJobDefinitionId); historicIncidentManager.deleteHistoricIncidentsByJobDefinitionId(monitorJobDefinitionId); historicIncidentManager.deleteHistoricIncidentsByJobDefinitionId(batchJobDefinitionId); HistoricJobLogManager historicJobLogManager = commandContext.getHistoricJobLogManager(); historicJobLogManager.deleteHistoricJobLogsByJobDefinitionId(seedJobDefinitionId); historicJobLogManager.deleteHistoricJobLogsByJobDefinitionId(monitorJobDefinitionId); historicJobLogManager.deleteHistoricJobLogsByJobDefinitionId(batchJobDefinitionId); commandContext.getHistoricBatchManager().deleteHistoricBatchById(id); } }