You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had searched in the issues and found no similar feature requirement.
Description
I want to execute condition like ['abc','def'].includes(${output}) in switch task, but error occurs:
javax.script.ScriptException: TypeError: ["abc", "efg"].includes is not a function in <eval> at line number 1
at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:470)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:454)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:406)
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 org.apache.dolphinscheduler.server.master.utils.SwitchTaskUtils.evaluate(SwitchTaskUtils.java:35)
create a workflow containing a switch task. set the condition like ['abc','def'].includes('abc'), and you will get the exception. I use the 3.2.0 version, and I also tried in 3.2.2, same situation.
Search before asking
Description
I want to execute condition like
['abc','def'].includes(${output})
in switch task, but error occurs:Actually the includes function can be supported by using polyfills as https://stackoverflow.com/questions/47543566/scriptengine-javascript-doesnt-support-includes mentioned.
Are you willing to submit a PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: