コード例 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") public void deleteProcessInstancesByProcessDefinition(String processDefinitionId, String deleteReason, boolean cascade, boolean skipCustomListeners, boolean skipIoMappings)
        public virtual void deleteProcessInstancesByProcessDefinition(string processDefinitionId, string deleteReason, bool cascade, bool skipCustomListeners, bool skipIoMappings)
        {
            IList <string> processInstanceIds = DbEntityManager.selectList("selectProcessInstanceIdsByProcessDefinitionId", processDefinitionId);

            foreach (string processInstanceId in processInstanceIds)
            {
                deleteProcessInstance(processInstanceId, deleteReason, cascade, skipCustomListeners, false, skipIoMappings, false);
            }

            if (cascade)
            {
                HistoricProcessInstanceManager.deleteHistoricProcessInstanceByProcessDefinitionId(processDefinitionId);
            }
        }
コード例 #2
0
        public virtual void deleteProcessInstance(string processInstanceId, string deleteReason, bool cascade, bool skipCustomListeners, bool externallyTerminated, bool skipIoMappings, bool skipSubprocesses)
        {
            ExecutionEntity execution = findExecutionById(processInstanceId);

            if (execution == null)
            {
                throw LOG.requestedProcessInstanceNotFoundException(processInstanceId);
            }

            TaskManager.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)
            {
                HistoricProcessInstanceManager.deleteHistoricProcessInstanceByIds(Arrays.asList(processInstanceId));
            }
        }