|
|
|
@ -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); |
|
|
|
@ -262,7 +262,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) { |
|
|
|
@ -717,7 +717,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; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|