@SuppressWarnings("unchecked") public void deleteProcessInstancesByProcessDefinition(String processDefinitionId, String deleteReason, boolean cascade, boolean skipCustomListeners, boolean skipIoMappings) { List<String> processInstanceIds = getDbEntityManager() .selectList("selectProcessInstanceIdsByProcessDefinitionId", processDefinitionId); for (String processInstanceId: processInstanceIds) { deleteProcessInstance(processInstanceId, deleteReason, cascade, skipCustomListeners, false, skipIoMappings, false); } if (cascade) { getHistoricProcessInstanceManager().deleteHistoricProcessInstanceByProcessDefinitionId(processDefinitionId); } }
@SuppressWarnings("unchecked") public void deleteProcessInstancesByProcessDefinition(String processDefinitionId, String deleteReason, boolean cascade, boolean skipCustomListeners, boolean skipIoMappings) { List<String> processInstanceIds = getDbEntityManager() .selectList("selectProcessInstanceIdsByProcessDefinitionId", processDefinitionId); for (String processInstanceId: processInstanceIds) { deleteProcessInstance(processInstanceId, deleteReason, cascade, skipCustomListeners, false, skipIoMappings, false); } if (cascade) { getHistoricProcessInstanceManager().deleteHistoricProcessInstanceByProcessDefinitionId(processDefinitionId); } }
public void deleteProcessInstance(String processInstanceId, String deleteReason, boolean cascade, boolean skipCustomListeners, boolean externallyTerminated, boolean skipIoMappings, boolean skipSubprocesses) { ExecutionEntity execution = findExecutionById(processInstanceId); if(execution == null) { throw LOG.requestedProcessInstanceNotFoundException(processInstanceId); } getTaskManager().deleteTasksByProcessInstanceId(processInstanceId, deleteReason, cascade, skipCustomListeners); // delete the execution BEFORE we delete the history, otherwise we will produce orphan HistoricVariableInstance instances execution.deleteCascade(deleteReason, skipCustomListeners, skipIoMappings, externallyTerminated, skipSubprocesses); if (cascade) { getHistoricProcessInstanceManager().deleteHistoricProcessInstanceByIds(Arrays.asList(processInstanceId)); } }
public void deleteProcessInstance(String processInstanceId, String deleteReason, boolean cascade, boolean skipCustomListeners, boolean externallyTerminated, boolean skipIoMappings, boolean skipSubprocesses) { ExecutionEntity execution = findExecutionById(processInstanceId); if(execution == null) { throw LOG.requestedProcessInstanceNotFoundException(processInstanceId); } getTaskManager().deleteTasksByProcessInstanceId(processInstanceId, deleteReason, cascade, skipCustomListeners); // delete the execution BEFORE we delete the history, otherwise we will produce orphan HistoricVariableInstance instances execution.deleteCascade(deleteReason, skipCustomListeners, skipIoMappings, externallyTerminated, skipSubprocesses); if (cascade) { getHistoricProcessInstanceManager().deleteHistoricProcessInstanceByIds(Arrays.asList(processInstanceId)); } }
@SuppressWarnings("unchecked") public void deleteProcessInstancesByProcessDefinition(String processDefinitionId, String deleteReason, boolean cascade, boolean skipCustomListeners, boolean skipIoMappings) { List<String> processInstanceIds = getDbEntityManager() .selectList("selectProcessInstanceIdsByProcessDefinitionId", processDefinitionId); for (String processInstanceId: processInstanceIds) { deleteProcessInstance(processInstanceId, deleteReason, cascade, skipCustomListeners, false, skipIoMappings, false); } if (cascade) { getHistoricProcessInstanceManager().deleteHistoricProcessInstanceByProcessDefinitionId(processDefinitionId); } }
public void deleteProcessInstance(String processInstanceId, String deleteReason, boolean cascade, boolean skipCustomListeners, boolean externallyTerminated, boolean skipIoMappings, boolean skipSubprocesses) { ExecutionEntity execution = findExecutionById(processInstanceId); if(execution == null) { throw LOG.requestedProcessInstanceNotFoundException(processInstanceId); } getTaskManager().deleteTasksByProcessInstanceId(processInstanceId, deleteReason, cascade, skipCustomListeners); // delete the execution BEFORE we delete the history, otherwise we will produce orphan HistoricVariableInstance instances execution.deleteCascade(deleteReason, skipCustomListeners, skipIoMappings, externallyTerminated, skipSubprocesses); if (cascade) { getHistoricProcessInstanceManager().deleteHistoricProcessInstanceByIds(Arrays.asList(processInstanceId)); } }