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