TAMULib / mod-camunda

Apache License 2.0
0 stars 0 forks source link

Issue 302: Switch from Nashorn to GraalVM for Javascript execution. #221

Closed kaladay closed 10 months ago

kaladay commented 10 months ago

resolves TAMULib/fw-registry#302

In addition to information provided on the issue, this dependency is also required:

    <dependency>
      <groupId>org.graalvm.js</groupId>
      <artifactId>js-scriptengine</artifactId>
      <version>22.3.3</version>
    </dependency>

The configuration file appears to be case sensitive. Use Graal.js with an upper case G rather than a lower case g.

The following warning is observed:

[engine] WARNING: The polyglot context is using an implementation that does not support runtime compilation.
The guest application code will therefore be executed in interpreted mode only.
Execution only in interpreted mode will strongly impact the guest application performance.
For more information on using GraalVM see https://www.graalvm.org/java/quickstart/.
To disable this warning the '--engine.WarnInterpreterOnly=false' option or use the '-Dpolyglot.engine.WarnInterpreterOnly=false' system property.
[engine] WARNING: The polyglot context is using an implementation that does not support runtime compilation.
The guest application code will therefore be executed in interpreted mode only.
Execution only in interpreted mode will strongly impact the guest application performance.
For more information on using GraalVM see https://www.graalvm.org/java/quickstart/.
To disable this warning the '--engine.WarnInterpreterOnly=false' option or use the '-Dpolyglot.engine.WarnInterpreterOnly=false' system property.

When JS processing errors happen, this gets shown:

Execution of JMS message listener failed, and no ErrorHandler has been set.

see: https://forum.camunda.io/t/console-filling-with-graalvm-warnings-when-using-in-process-scripting/31812/2 see: https://docs.camunda.org/manual/7.19/user-guide/process-engine/scripting/#custom-scriptengineresolver