-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
Search before asking
- I had searched in the issues and found no similar issues.
What happened
Based on version 3.3.2 (the Fix-17967 patch has been applied) (Fix Parameter passing feature is unavailable in Procedure Task), when a stored procedure is configured with custom OUT parameters but no return value, the Switch node fails to retrieve these parameters. This issue does not occur in version 3.2.2.
#Stored Procedure Node Configuration
#Switch Node Configuration
#error log of Switch Node
[LOG-PATH]: /opt/apache-dolphinscheduler-3.3.2-bin/master-server/logs/20260211/165236478352384/5/45/170.log, [HOST]: xx.xx.xx.xxxx:5678
2026-02-11 15:16:52.185 INFO [shared-task-executor-container-worker-5] - 🐬 Initialize Task Context
2026-02-11 15:16:52.193 INFO [shared-task-executor-container-worker-5] - 🐬 Load Task Instance Plugin
2026-02-11 15:16:52.193 INFO [shared-task-executor-container-worker-5] - Success initialize parameters:
{
"localParams" : [ ],
"varPool" : [ ],
"switchResult" : {
"dependTaskList" : [ {
"condition" : "${outpara1} == '0'",
"nextNode" : 165236478349314
}, {
"condition" : "${outpara1} != '0'",
"nextNode" : 165236478349316
} ],
"nextNode" : null
},
"nextBranch" : null
}
2026-02-11 15:16:52.193 INFO [shared-task-executor-container-worker-5] - Initialized task plugin instance: SWITCH successfully
2026-02-11 15:16:52.193 INFO [shared-task-executor-container-worker-5] - 🐬 Execute Task Instance
2026-02-11 15:16:52.193 INFO [shared-task-executor-container-worker-5] - Begin to execute switch item: SwitchResultVo(condition=${outpara1} == '0', nextNode=165236478349314)
2026-02-11 15:16:52.193 INFO [shared-task-executor-container-worker-5] - Format condition sentence::${outpara1} == "0" successfully
2026-02-11 15:16:52.213 INFO [shared-task-executor-container-worker-5] - Execute switch item: SwitchResultVo(condition=${outpara1} == '0', nextNode=165236478349314) failed
javax.script.ScriptException: :1:118 Expected ; but found {
Object.defineProperty(this, 'engine', {});Object.defineProperty(this, 'context', {});delete this.noSuchProperty;$ {
^ in at line number 1 at column number 118
at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:470)
at jdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:537)
at jdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:524)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402)
at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
at delight.nashornsandbox.internal.EvaluateOperation.executeScriptEngineOperation(EvaluateOperation.java:47)
at delight.nashornsandbox.internal.NashornSandboxImpl.executeSandboxedOperation(NashornSandboxImpl.java:284)
at delight.nashornsandbox.internal.NashornSandboxImpl.eval(NashornSandboxImpl.java:267)
at delight.nashornsandbox.internal.NashornSandboxImpl.eval(NashornSandboxImpl.java:231)
at org.apache.dolphinscheduler.server.master.utils.SwitchTaskUtils.evaluate(SwitchTaskUtils.java:78)
at org.apache.dolphinscheduler.server.master.engine.executor.plugin.switchtask.SwitchLogicTask.calculateSwitchBranch(SwitchLogicTask.java:105)
at org.apache.dolphinscheduler.server.master.engine.executor.plugin.switchtask.SwitchLogicTask.start(SwitchLogicTask.java:70)
at org.apache.dolphinscheduler.server.master.engine.executor.LogicTaskExecutor.doTriggerTaskPlugin(LogicTaskExecutor.java:59)
at org.apache.dolphinscheduler.task.executor.AbstractTaskExecutor.start(AbstractTaskExecutor.java:81)
at org.apache.dolphinscheduler.task.executor.worker.TaskExecutorWorker.start(TaskExecutorWorker.java:65)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Caused by: jdk.nashorn.internal.runtime.ParserException: :1:118 Expected ; but found {
Object.defineProperty(this, 'engine', {});Object.defineProperty(this, 'context', {});delete this.noSuchProperty;$ {
^
at jdk.nashorn.internal.parser.AbstractParser.error(AbstractParser.java:294)
at jdk.nashorn.internal.parser.AbstractParser.error(AbstractParser.java:279)
at jdk.nashorn.internal.parser.AbstractParser.expectDontAdvance(AbstractParser.java:350)
at jdk.nashorn.internal.parser.AbstractParser.expect(AbstractParser.java:337)
at jdk.nashorn.internal.parser.Parser.endOfLine(Parser.java:3372)
at jdk.nashorn.internal.parser.Parser.expressionStatement(Parser.java:1160)
at jdk.nashorn.internal.parser.Parser.statement(Parser.java:967)
at jdk.nashorn.internal.parser.Parser.sourceElements(Parser.java:773)
at jdk.nashorn.internal.parser.Parser.program(Parser.java:709)
at jdk.nashorn.internal.parser.Parser.parse(Parser.java:283)
at jdk.nashorn.internal.parser.Parser.parse(Parser.java:249)
at jdk.nashorn.internal.runtime.Context.compile(Context.java:1284)
at jdk.nashorn.internal.runtime.Context.compileScript(Context.java:1251)
at jdk.nashorn.internal.runtime.Context.compileScript(Context.java:627)
at jdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:535)
... 19 common frames omitted
2026-02-11 15:16:52.213 INFO [shared-task-executor-container-worker-5] - Begin to execute switch item: SwitchResultVo(condition=${outpara1} != '0', nextNode=165236478349316)
2026-02-11 15:16:52.213 INFO [shared-task-executor-container-worker-5] - Format condition sentence::${outpara1} != "0" successfully
2026-02-11 15:16:52.222 INFO [shared-task-executor-container-worker-5] - Execute switch item: SwitchResultVo(condition=${outpara1} != '0', nextNode=165236478349316) failed
javax.script.ScriptException: :1:118 Expected ; but found {
Object.defineProperty(this, 'engine', {});Object.defineProperty(this, 'context', {});delete this.noSuchProperty;$ {
^ in at line number 1 at column number 118
at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:470)
at jdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:537)
at jdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:524)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402)
at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
at delight.nashornsandbox.internal.EvaluateOperation.executeScriptEngineOperation(EvaluateOperation.java:47)
at delight.nashornsandbox.internal.NashornSandboxImpl.executeSandboxedOperation(NashornSandboxImpl.java:284)
at delight.nashornsandbox.internal.NashornSandboxImpl.eval(NashornSandboxImpl.java:267)
at delight.nashornsandbox.internal.NashornSandboxImpl.eval(NashornSandboxImpl.java:231)
at org.apache.dolphinscheduler.server.master.utils.SwitchTaskUtils.evaluate(SwitchTaskUtils.java:78)
at org.apache.dolphinscheduler.server.master.engine.executor.plugin.switchtask.SwitchLogicTask.calculateSwitchBranch(SwitchLogicTask.java:105)
at org.apache.dolphinscheduler.server.master.engine.executor.plugin.switchtask.SwitchLogicTask.start(SwitchLogicTask.java:70)
at org.apache.dolphinscheduler.server.master.engine.executor.LogicTaskExecutor.doTriggerTaskPlugin(LogicTaskExecutor.java:59)
at org.apache.dolphinscheduler.task.executor.AbstractTaskExecutor.start(AbstractTaskExecutor.java:81)
at org.apache.dolphinscheduler.task.executor.worker.TaskExecutorWorker.start(TaskExecutorWorker.java:65)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Caused by: jdk.nashorn.internal.runtime.ParserException: :1:118 Expected ; but found {
Object.defineProperty(this, 'engine', {});Object.defineProperty(this, 'context', {});delete this.noSuchProperty;$ {
^
at jdk.nashorn.internal.parser.AbstractParser.error(AbstractParser.java:294)
at jdk.nashorn.internal.parser.AbstractParser.error(AbstractParser.java:279)
at jdk.nashorn.internal.parser.AbstractParser.expectDontAdvance(AbstractParser.java:350)
at jdk.nashorn.internal.parser.AbstractParser.expect(AbstractParser.java:337)
at jdk.nashorn.internal.parser.Parser.endOfLine(Parser.java:3372)
at jdk.nashorn.internal.parser.Parser.expressionStatement(Parser.java:1160)
at jdk.nashorn.internal.parser.Parser.statement(Parser.java:967)
at jdk.nashorn.internal.parser.Parser.sourceElements(Parser.java:773)
at jdk.nashorn.internal.parser.Parser.program(Parser.java:709)
at jdk.nashorn.internal.parser.Parser.parse(Parser.java:283)
at jdk.nashorn.internal.parser.Parser.parse(Parser.java:249)
at jdk.nashorn.internal.runtime.Context.compile(Context.java:1284)
at jdk.nashorn.internal.runtime.Context.compileScript(Context.java:1251)
at jdk.nashorn.internal.runtime.Context.compileScript(Context.java:627)
at jdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:535)
... 19 common frames omitted
2026-02-11 15:16:52.222 INFO [shared-task-executor-container-worker-5] - All switch item is not satisfied
2026-02-11 15:16:52.222 INFO [shared-task-executor-container-worker-5] - Begin to move to the default branch
2026-02-11 15:16:52.223 ERROR [shared-task-executor-container-worker-5] - LogicTaskExecutor{id=170, name=判断是否成功, stat=RUNNING} execute failed
java.lang.IllegalArgumentException: The default branch is empty, please check the switch task configuration
at org.apache.dolphinscheduler.server.master.engine.executor.plugin.switchtask.SwitchLogicTask.moveToDefaultBranch(SwitchLogicTask.java:82)
at org.apache.dolphinscheduler.server.master.engine.executor.plugin.switchtask.SwitchLogicTask.calculateSwitchBranch(SwitchLogicTask.java:119)
at org.apache.dolphinscheduler.server.master.engine.executor.plugin.switchtask.SwitchLogicTask.start(SwitchLogicTask.java:70)
at org.apache.dolphinscheduler.server.master.engine.executor.LogicTaskExecutor.doTriggerTaskPlugin(LogicTaskExecutor.java:59)
at org.apache.dolphinscheduler.task.executor.AbstractTaskExecutor.start(AbstractTaskExecutor.java:81)
at org.apache.dolphinscheduler.task.executor.worker.TaskExecutorWorker.start(TaskExecutorWorker.java:65)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
2026-02-11 15:16:52.450 INFO [LogicTaskExecutorEventBusCoordinator-eventbus-coordinator-worker-0] - 🐬 Finalize Task Instance
2026-02-11 15:16:52.452 INFO [LogicTaskExecutorEventBusCoordinator-eventbus-coordinator-worker-0] - FINALIZE_SESSION
What you expected to happen
When no value is assigned to the output parameter in the stored procedure, the Switch node can obtain the default value of the custom parameter from the Stored Procedure node.
How to reproduce
Based on version 3.3.2 (the Fix-17967 patch has been applied)(Fix Parameter passing feature is unavailable in Procedure Task)
#Stored Procedure Node Configuration
#Switch Node Configuration
#error log of Switch Node
Anything else
No response
Version
3.3.2
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct