This is an automated email from the ASF dual-hosted git repository.

leonbao pushed a commit to branch 2.0.1-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/2.0.1-prepare by this push:
     new 26d2c52  [cherry-pick][Fix-7019][MasterServer] Fix the issue with 
failing to save and run the process that contains the switch task (#7068)
26d2c52 is described below

commit 26d2c52c25a71d892814f3fd8f905b9ed506e83f
Author: wind <[email protected]>
AuthorDate: Tue Nov 30 16:40:39 2021 +0800

    [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 <[email protected]>
    Co-authored-by: caishunfeng <[email protected]>
---
 .../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 dc59795..ff04a55 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<String> nextNode;
+    private int resultConditionLocation;
+    private List<SwitchResultVo> dependTaskList;
 
     @Override
     public boolean checkParameters() {
@@ -40,9 +42,6 @@ public class SwitchParameters extends AbstractParameters {
         return new ArrayList<>();
     }
 
-    private int resultConditionLocation;
-    private List<SwitchResultVo> dependTaskList;
-
     public DependentRelation getDependRelation() {
         return dependRelation;
     }
@@ -84,6 +83,10 @@ public class SwitchParameters extends AbstractParameters {
             List<String> nextNodeList = new ArrayList<>();
             nextNodeList.add(String.valueOf(nextNode));
             this.nextNode = nextNodeList;
+        } else if (nextNode instanceof Number) {
+            List<String> nextNodeList = new ArrayList<>();
+            nextNodeList.add(nextNode.toString());
+            this.nextNode = nextNodeList;
         } else {
             this.nextNode = (ArrayList) nextNode;
         }

Reply via email to