|
|
@ -341,16 +341,7 @@ public class ProcessServiceImpl implements ProcessService { |
|
|
|
processInstance.getProcessDefinitionCode(), |
|
|
|
processInstance.getProcessDefinitionCode(), |
|
|
|
processInstance.getProcessDefinitionVersion(), Constants.RUNNING_PROCESS_STATE, |
|
|
|
processInstance.getProcessDefinitionVersion(), Constants.RUNNING_PROCESS_STATE, |
|
|
|
processInstance.getId()); |
|
|
|
processInstance.getId()); |
|
|
|
if (CollectionUtils.isEmpty(runningProcessInstances)) { |
|
|
|
|
|
|
|
processInstance.setState(WorkflowExecutionStatus.SUBMITTED_SUCCESS); |
|
|
|
|
|
|
|
saveProcessInstance(processInstance); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
for (ProcessInstance info : runningProcessInstances) { |
|
|
|
for (ProcessInstance info : runningProcessInstances) { |
|
|
|
if (Objects.nonNull(info.getState()) && (WorkflowExecutionStatus.READY_STOP.equals(info.getState()) |
|
|
|
|
|
|
|
|| info.getState().isFinished())) { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
info.setCommandType(CommandType.STOP); |
|
|
|
info.setCommandType(CommandType.STOP); |
|
|
|
info.addHistoryCmd(CommandType.STOP); |
|
|
|
info.addHistoryCmd(CommandType.STOP); |
|
|
|
info.setState(WorkflowExecutionStatus.READY_STOP); |
|
|
|
info.setState(WorkflowExecutionStatus.READY_STOP); |
|
|
@ -368,6 +359,8 @@ public class ProcessServiceImpl implements ProcessService { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
processInstance.setState(WorkflowExecutionStatus.SUBMITTED_SUCCESS); |
|
|
|
|
|
|
|
saveProcessInstance(processInstance); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|