|
|
@ -333,10 +333,13 @@ public class ProcessServiceImpl implements ProcessService { |
|
|
|
} else if (processDefinition.getExecutionType().typeIsSerialDiscard()) { |
|
|
|
} else if (processDefinition.getExecutionType().typeIsSerialDiscard()) { |
|
|
|
List<ProcessInstance> runningProcessInstances = this.processInstanceMapper.queryByProcessDefineCodeAndProcessDefinitionVersionAndStatusAndNextId(processInstance.getProcessDefinitionCode(), |
|
|
|
List<ProcessInstance> runningProcessInstances = this.processInstanceMapper.queryByProcessDefineCodeAndProcessDefinitionVersionAndStatusAndNextId(processInstance.getProcessDefinitionCode(), |
|
|
|
processInstance.getProcessDefinitionVersion(), Constants.RUNNING_PROCESS_STATE, processInstance.getId()); |
|
|
|
processInstance.getProcessDefinitionVersion(), Constants.RUNNING_PROCESS_STATE, processInstance.getId()); |
|
|
|
if (CollectionUtils.isEmpty(runningProcessInstances)) { |
|
|
|
if (CollectionUtils.isNotEmpty(runningProcessInstances)) { |
|
|
|
processInstance.setState(ExecutionStatus.STOP); |
|
|
|
processInstance.setState(ExecutionStatus.STOP); |
|
|
|
saveProcessInstance(processInstance); |
|
|
|
saveProcessInstance(processInstance); |
|
|
|
|
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
processInstance.setState(ExecutionStatus.SUBMITTED_SUCCESS); |
|
|
|
|
|
|
|
saveProcessInstance(processInstance); |
|
|
|
} else if (processDefinition.getExecutionType().typeIsSerialPriority()) { |
|
|
|
} else if (processDefinition.getExecutionType().typeIsSerialPriority()) { |
|
|
|
List<ProcessInstance> runningProcessInstances = this.processInstanceMapper.queryByProcessDefineCodeAndProcessDefinitionVersionAndStatusAndNextId(processInstance.getProcessDefinitionCode(), |
|
|
|
List<ProcessInstance> runningProcessInstances = this.processInstanceMapper.queryByProcessDefineCodeAndProcessDefinitionVersionAndStatusAndNextId(processInstance.getProcessDefinitionCode(), |
|
|
|
processInstance.getProcessDefinitionVersion(), Constants.RUNNING_PROCESS_STATE, processInstance.getId()); |
|
|
|
processInstance.getProcessDefinitionVersion(), Constants.RUNNING_PROCESS_STATE, processInstance.getId()); |
|
|
|