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