|
|
|
@ -1083,13 +1083,10 @@ public class WorkflowExecuteThread {
|
|
|
|
|
return DependResult.SUCCESS; |
|
|
|
|
} |
|
|
|
|
TaskNode taskNode = dag.getNode(taskCode); |
|
|
|
|
List<String> depCodeList = taskNode.getDepList(); |
|
|
|
|
for (String depsNode : depCodeList) { |
|
|
|
|
if (!dag.containsNode(depsNode) |
|
|
|
|
|| forbiddenTaskMap.containsKey(depsNode) |
|
|
|
|
|| skipTaskNodeMap.containsKey(depsNode)) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
List<String> indirectDepCodeList = new ArrayList<>(); |
|
|
|
|
setIndirectDepList(taskCode, indirectDepCodeList); |
|
|
|
|
for (String depsNode : indirectDepCodeList) { |
|
|
|
|
if (dag.containsNode(depsNode) && !skipTaskNodeMap.containsKey(depsNode)) { |
|
|
|
|
// dependencies must be fully completed
|
|
|
|
|
if (!completeTaskMap.containsKey(depsNode)) { |
|
|
|
|
return DependResult.WAITING; |
|
|
|
@ -1107,10 +1104,30 @@ public class WorkflowExecuteThread {
|
|
|
|
|
return DependResult.FAILED; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
logger.info("taskCode: {} completeDependTaskList: {}", taskCode, Arrays.toString(completeTaskMap.keySet().toArray())); |
|
|
|
|
return DependResult.SUCCESS; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* This function is specially used to handle the dependency situation where the parent node is a prohibited node. |
|
|
|
|
* When the parent node is a forbidden node, the dependency relationship should continue to be traced |
|
|
|
|
* |
|
|
|
|
* @param taskCode taskCode |
|
|
|
|
* @param indirectDepCodeList All indirectly dependent nodes |
|
|
|
|
*/ |
|
|
|
|
private void setIndirectDepList(String taskCode, List<String> indirectDepCodeList) { |
|
|
|
|
TaskNode taskNode = dag.getNode(taskCode); |
|
|
|
|
List<String> depCodeList = taskNode.getDepList(); |
|
|
|
|
for (String depsNode : depCodeList) { |
|
|
|
|
if (forbiddenTaskMap.containsKey(depsNode)) { |
|
|
|
|
setIndirectDepList(depsNode, indirectDepCodeList); |
|
|
|
|
} else { |
|
|
|
|
indirectDepCodeList.add(depsNode); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* depend node is completed, but here need check the condition task branch is the next node |
|
|
|
|
*/ |
|
|
|
|