From 26d2c52c25a71d892814f3fd8f905b9ed506e83f Mon Sep 17 00:00:00 2001 From: wind Date: Tue, 30 Nov 2021 16:40:39 +0800 Subject: [PATCH] [cherry-pick][Fix-7019][MasterServer] Fix the issue with failing to save and run the process that contains the switch task (#7068) * [Fix-7019][MasterServer] Fix the issue with failing to save and run the process that contains the switch task. (#7046) * fix switch next code Co-authored-by: Hua Jiang Co-authored-by: caishunfeng <534328519@qq.com> --- .../common/task/switchtask/SwitchParameters.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/switchtask/SwitchParameters.java b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/switchtask/SwitchParameters.java index dc59795308..ff04a55b33 100644 --- a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/switchtask/SwitchParameters.java +++ b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/switchtask/SwitchParameters.java @@ -29,6 +29,8 @@ public class SwitchParameters extends AbstractParameters { private DependentRelation dependRelation; private String relation; private List nextNode; + private int resultConditionLocation; + private List dependTaskList; @Override public boolean checkParameters() { @@ -40,9 +42,6 @@ public class SwitchParameters extends AbstractParameters { return new ArrayList<>(); } - private int resultConditionLocation; - private List dependTaskList; - public DependentRelation getDependRelation() { return dependRelation; } @@ -84,6 +83,10 @@ public class SwitchParameters extends AbstractParameters { List nextNodeList = new ArrayList<>(); nextNodeList.add(String.valueOf(nextNode)); this.nextNode = nextNodeList; + } else if (nextNode instanceof Number) { + List nextNodeList = new ArrayList<>(); + nextNodeList.add(nextNode.toString()); + this.nextNode = nextNodeList; } else { this.nextNode = (ArrayList) nextNode; }