@SuppressWarnings("unchecked") public List<Attachment> findAttachmentsByProcessInstanceId(String processInstanceId) { checkHistoryEnabled(); return getDbEntityManager().selectList("selectAttachmentsByProcessInstanceId", processInstanceId); }
public void deleteAttachmentsByTaskProcessInstanceIds(List<String> processInstanceIds) { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("taskProcessInstanceIds", processInstanceIds); deleteAttachments(parameters); }
public Attachment execute(CommandContext commandContext) { return commandContext .getAttachmentManager() .findAttachmentByTaskIdAndAttachmentId(taskId, attachmentId); }
@SuppressWarnings("unchecked") public void deleteAttachmentsByTaskId(String taskId) { checkHistoryEnabled(); List<AttachmentEntity> attachments = getDbEntityManager().selectList("selectAttachmentsByTaskId", taskId); for (AttachmentEntity attachment: attachments) { String contentId = attachment.getContentId(); if (contentId!=null) { getByteArrayManager().deleteByteArrayById(contentId); } getDbEntityManager().delete(attachment); } }
public List<Attachment> execute(CommandContext commandContext) { return commandContext .getAttachmentManager() .findAttachmentsByProcessInstanceId(processInstanceId); } }
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 deleteHistoricTaskInstancesByCaseInstanceIds(List<String> caseInstanceIds) { CommandContext commandContext = Context.getCommandContext(); getHistoricDetailManager() .deleteHistoricDetailsByTaskCaseInstanceIds(caseInstanceIds); commandContext .getCommentManager() .deleteCommentsByTaskCaseInstanceIds(caseInstanceIds); getAttachmentManager() .deleteAttachmentsByTaskCaseInstanceIds(caseInstanceIds); getHistoricIdentityLinkManager() .deleteHistoricIdentityLinksLogByTaskCaseInstanceIds(caseInstanceIds); getDbEntityManager().deletePreserveOrder(HistoricTaskInstanceEntity.class, "deleteHistoricTaskInstanceByCaseInstanceIds", caseInstanceIds); }
/** * Deletes all data related with tasks, which belongs to specified process instance ids. * @param processInstanceIds * @param deleteVariableInstances when true, will also delete variable instances. Can be false when variable instances were deleted separately. */ public void deleteHistoricTaskInstancesByProcessInstanceIds(List<String> processInstanceIds, boolean deleteVariableInstances) { CommandContext commandContext = Context.getCommandContext(); if (deleteVariableInstances) { getHistoricVariableInstanceManager().deleteHistoricVariableInstancesByTaskProcessInstanceIds(processInstanceIds); } getHistoricDetailManager() .deleteHistoricDetailsByTaskProcessInstanceIds(processInstanceIds); commandContext .getCommentManager() .deleteCommentsByTaskProcessInstanceIds(processInstanceIds); getAttachmentManager() .deleteAttachmentsByTaskProcessInstanceIds(processInstanceIds); getHistoricIdentityLinkManager() .deleteHistoricIdentityLinksLogByTaskProcessInstanceIds(processInstanceIds); getDbEntityManager().deletePreserveOrder(HistoricTaskInstanceEntity.class, "deleteHistoricTaskInstanceByProcessInstanceIds", processInstanceIds); }
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); } } }
.addRemovalTimeToAttachmentsByRootProcessInstanceId(rootProcessInstanceId, removalTime);
.deleteAttachmentsByRemovalTime(removalTime, minuteFrom, minuteTo, batchSize);
@SuppressWarnings("unchecked") public void deleteAttachmentsByTaskId(String taskId) { checkHistoryEnabled(); List<AttachmentEntity> attachments = getDbEntityManager().selectList("selectAttachmentsByTaskId", taskId); for (AttachmentEntity attachment: attachments) { String contentId = attachment.getContentId(); if (contentId!=null) { getByteArrayManager().deleteByteArrayById(contentId); } getDbEntityManager().delete(attachment); } }
public List<Attachment> execute(CommandContext commandContext) { return commandContext .getAttachmentManager() .findAttachmentsByProcessInstanceId(processInstanceId); } }
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 deleteHistoricTaskInstancesByCaseInstanceIds(List<String> caseInstanceIds) { CommandContext commandContext = Context.getCommandContext(); getHistoricDetailManager() .deleteHistoricDetailsByTaskCaseInstanceIds(caseInstanceIds); commandContext .getCommentManager() .deleteCommentsByTaskCaseInstanceIds(caseInstanceIds); getAttachmentManager() .deleteAttachmentsByTaskCaseInstanceIds(caseInstanceIds); getHistoricIdentityLinkManager() .deleteHistoricIdentityLinksLogByTaskCaseInstanceIds(caseInstanceIds); getDbEntityManager().deletePreserveOrder(HistoricTaskInstanceEntity.class, "deleteHistoricTaskInstanceByCaseInstanceIds", caseInstanceIds); }
/** * Deletes all data related with tasks, which belongs to specified process instance ids. * @param processInstanceIds * @param deleteVariableInstances when true, will also delete variable instances. Can be false when variable instances were deleted separately. */ public void deleteHistoricTaskInstancesByProcessInstanceIds(List<String> processInstanceIds, boolean deleteVariableInstances) { CommandContext commandContext = Context.getCommandContext(); if (deleteVariableInstances) { getHistoricVariableInstanceManager().deleteHistoricVariableInstancesByTaskProcessInstanceIds(processInstanceIds); } getHistoricDetailManager() .deleteHistoricDetailsByTaskProcessInstanceIds(processInstanceIds); commandContext .getCommentManager() .deleteCommentsByTaskProcessInstanceIds(processInstanceIds); getAttachmentManager() .deleteAttachmentsByTaskProcessInstanceIds(processInstanceIds); getHistoricIdentityLinkManager() .deleteHistoricIdentityLinksLogByTaskProcessInstanceIds(processInstanceIds); getDbEntityManager().deletePreserveOrder(HistoricTaskInstanceEntity.class, "deleteHistoricTaskInstanceByProcessInstanceIds", processInstanceIds); }
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); } } }
.addRemovalTimeToAttachmentsByRootProcessInstanceId(rootProcessInstanceId, removalTime);
.deleteAttachmentsByRemovalTime(removalTime, minuteFrom, minuteTo, batchSize);
@SuppressWarnings("unchecked") public List<Attachment> findAttachmentsByProcessInstanceId(String processInstanceId) { checkHistoryEnabled(); return getDbEntityManager().selectList("selectAttachmentsByProcessInstanceId", processInstanceId); }