GraalJS support
Last updated
Was this helpful?
Last updated
Was this helpful?
It is possible to use the runtime instead of for JavaScript evaluation. GraalJS is fully ECMAScript 2022 compliant while Rhino only supports ECMAScript 5.
This only has an effect if present in the top-level flow. It is ignored when included in any subflows.
When , use the flow config above. The env var below is not supported in the cloud.
There are some differences between the new GraalJsEngine
and the current RhinoJsEngine
implementation that are worth noting. All of the differences below and some others are documented and tested by the GraalJsEngineTest
and RhinoJsEngineTest
tests.
Can not reuse variable names across scripts within the same Flow
Can reuse variable names if redeclaration lives in a subflow
Can access variables declared earlier in the Flow in a separate script
output
variable is shared across all scripts
Variables are local to each script
output
variable is shared across all scripts
Some examples
Redeclaring variables across scripts
❌ Variable redeclarations throw an error
✅ Variable names can be reused across scripts
Accessing variables across scripts
✅ Variables are accessible across scripts
❌ Variables can't be accessed across scripts
Handling special characters
❌ Single backslash causes an exception
✅ Single backslash and all other special chars are handled correctly