diff --git a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/switchtask/SwitchResultVo.java b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/switchtask/SwitchResultVo.java index 558a6f1b83..07f0f94a54 100644 --- a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/switchtask/SwitchResultVo.java +++ b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/task/switchtask/SwitchResultVo.java @@ -42,6 +42,10 @@ public class SwitchResultVo { 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; } diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/utils/DagHelper.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/utils/DagHelper.java index 3501291847..d419505e83 100644 --- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/utils/DagHelper.java +++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/utils/DagHelper.java @@ -406,7 +406,7 @@ public class DagHelper { Map completeTaskList, DAG dag) { - SwitchParameters switchParameters = completeTaskList.get(taskNode.getName()).getSwitchDependency(); + SwitchParameters switchParameters = completeTaskList.get(Long.toString(taskNode.getCode())).getSwitchDependency(); int resultConditionLocation = switchParameters.getResultConditionLocation(); List conditionResultVoList = switchParameters.getDependTaskList(); List switchTaskList = conditionResultVoList.get(resultConditionLocation).getNextNode(); diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/SwitchTaskProcessor.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/SwitchTaskProcessor.java index 70013e176d..3b95c43190 100644 --- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/SwitchTaskProcessor.java +++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/SwitchTaskProcessor.java @@ -210,7 +210,7 @@ public class SwitchTaskProcessor extends BaseTaskProcessor { if (!org.apache.commons.lang.math.NumberUtils.isNumber(value)) { value = "\"" + value + "\""; } - logger.info("paramName:{},paramValue{}", paramName, value); + logger.info("paramName:{},paramValue:{}", paramName, value); content = content.replace("${" + paramName + "}", value); } return content;