fuchanghai commented on code in PR #14664:
URL: 
https://github.com/apache/dolphinscheduler/pull/14664#discussion_r1280030312


##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/utils/DagHelper.java:
##########
@@ -384,13 +384,40 @@ public static List<Long> parseConditionTask(Long nodeCode,
         // the skipNodeList maybe null if no next task
         skipNodeList = Optional.ofNullable(skipNodeList).orElse(new 
ArrayList<>());
         for (Long failedNode : skipNodeList) {
-            setTaskNodeSkip(failedNode, dag, completeTaskList, 
skipTaskNodeList);
+            // return nodes set to skip in setTaskNodeSkip method
+            Map<Long, TaskNode> skipNodesAfterFailedNode =
+                    setTaskNodeSkip(failedNode, dag, completeTaskList, 
skipTaskNodeList);
+            parseConditionNodeAfterSkippedNode(skipTaskNodeList, dag, 
conditionTaskList, skipNodesAfterFailedNode);
         }
         // the conditionTaskList maybe null if no next task
         conditionTaskList = Optional.ofNullable(conditionTaskList).orElse(new 
ArrayList<>());
         return conditionTaskList;
     }
 
+    /**
+     * In some special cases, such as the condition task is set to "OR", the 
condition task after skipped node needs to be submitted to execution
+     *
+     * @param skipTaskNodeList
+     * @param dag
+     * @param conditionTaskList
+     * @param skipTaskAfterNode
+     */
+    private static void parseConditionNodeAfterSkippedNode(Map<Long, TaskNode> 
skipTaskNodeList,
+                                                           DAG<Long, TaskNode, 
TaskNodeRelation> dag,
+                                                           List<Long> 
conditionTaskList,
+                                                           Map<Long, TaskNode> 
skipTaskAfterNode) {
+
+        for (Long taskCode : skipTaskAfterNode.keySet()) {
+            Set<Long> subsequentNodes = dag.getSubsequentNodes(taskCode);

Review Comment:
   I am puzzled by this, the ```skipTaskAfterNode ```parameters are all nodes 
not included in the ```dag```, so can you still get them through the ```dag```?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to