Unverified Commit 0cef5dd4 authored by lgcareer's avatar lgcareer Committed by GitHub
Browse files

Merge pull request #176 from analysys/branch-1.0.0

Branch 1.0.0 fix graphHasCycle
parents 9b1d48b6 f1e6e697
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -114,7 +114,7 @@ public class ProcessDefinitionService extends BaseDAGService {
        ProcessData processData = JSONUtils.parseObject(processDefinitionJson, ProcessData.class);
        Map<String, Object> checkProcessJson = checkProcessNodeList(processData, processDefinitionJson);
        if (checkProcessJson.get(Constants.STATUS) != Status.SUCCESS) {
            return result;
            return checkProcessJson;
        }

        processDefine.setName(name);
@@ -263,7 +263,7 @@ public class ProcessDefinitionService extends BaseDAGService {
        ProcessData processData = JSONUtils.parseObject(processDefinitionJson, ProcessData.class);
        Map<String, Object> checkProcessJson = checkProcessNodeList(processData, processDefinitionJson);
        if ((checkProcessJson.get(Constants.STATUS) != Status.SUCCESS)) {
            return result;
            return checkProcessJson;
        }
        ProcessDefinition processDefinition = processDao.findProcessDefineById(id);
        if (processDefinition == null) {
@@ -719,7 +719,9 @@ public class ProcessDefinitionService extends BaseDAGService {
            List<String> preTasks = JSONUtils.toList(taskNodeResponse.getPreTasks(),String.class);
            if (CollectionUtils.isNotEmpty(preTasks)) {
                for (String preTask : preTasks) {
                    graph.addEdge(preTask, taskNodeResponse.getName());
                    if (!graph.addEdge(preTask, taskNodeResponse.getName())) {
                        return true;
                    }
                }
            }
        }