public Void execute(CommandContext commandContext) { commandContext.getHistoricActivityInstanceManager() .deleteHistoricActivityInstancesByProcessInstanceIds(Collections.singletonList(processInstanceId)); commandContext.getHistoricTaskInstanceManager() .deleteHistoricTaskInstancesByProcessInstanceIds(Collections.singletonList(processInstanceId), true); List<HistoricJobLog> historicJobLogs = commandContext.getHistoricJobLogManager() .findHistoricJobLogsByQueryCriteria(new HistoricJobLogQueryImpl(), new Page(0, 100)); for (HistoricJobLog historicJobLog : historicJobLogs) { commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(historicJobLog.getJobId()); } 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); }
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 execute(CommandContext commandContext) { commandContext.getHistoricActivityInstanceManager() .deleteHistoricActivityInstancesByProcessInstanceIds(Collections.singletonList(processInstanceId)); commandContext.getHistoricTaskInstanceManager() .deleteHistoricTaskInstancesByProcessInstanceIds(Collections.singletonList(processInstanceId), true); List<HistoricJobLog> historicJobLogs = commandContext.getHistoricJobLogManager() .findHistoricJobLogsByQueryCriteria(new HistoricJobLogQueryImpl(), new Page(0, 100)); for (HistoricJobLog historicJobLog : historicJobLogs) { commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(historicJobLog.getJobId()); } 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); }