This is an automated email from the ASF dual-hosted git repository. kerwin pushed a commit to branch 3.1.5-prepare in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
commit c5a5ff7a74b7f4dcf7b306476e5c210623a62a22 Author: HomminLee <[email protected]> AuthorDate: Thu Mar 30 09:56:57 2023 +0800 [Fix-13657][Master]NPE caused by the execution of workflow with startNode and forbidden task (#13668) Co-authored-by: HomminLee <[email protected]> --- .../server/master/runner/WorkflowExecuteRunnable.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java index 4cbfb3b826..57a624d8f6 100644 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java +++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java @@ -1419,8 +1419,11 @@ public class WorkflowExecuteRunnable implements Callable<WorkflowSubmitStatue> { */ private void setIndirectDepList(String taskCode, List<String> indirectDepCodeList) { TaskNode taskNode = dag.getNode(taskCode); - List<String> depCodeList = taskNode.getDepList(); - for (String depsNode : depCodeList) { + // If workflow start with startNode or recoveryNode, taskNode may be null + if (taskNode == null) { + return; + } + for (String depsNode : taskNode.getDepList()) { if (forbiddenTaskMap.containsKey(Long.parseLong(depsNode))) { setIndirectDepList(depsNode, indirectDepCodeList); } else {
