Console filling with GraalVM warnings when using in-process scripting

Whenever we execute a script listener inside of our process, we see the following warning in the logs.

[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
To disable this warning the '--engine.WarnInterpreterOnly=false' option or use the '-Dpolyglot.engine.WarnInterpreterOnly=false' system property.

Here is one of the script blocks for reference

// set decision variable for job ending
var formJSON = execution.getVariable("formSubmission");
var data = JSON.parse(formJSON).data;
var jobEnding = data.jobEndingButton;

jobEnding = !!jobEnding;
execution.setVariable("isJobEnding", jobEnding);

Any ideas on what could be causing this issue?

Graal.js version: 21.2.0
Camunda version: 7.15.0
SpringBoot version: 2.4.2
Java version: 17

I know this thread is a little old, but we recently came across this problem and I couldn’t find a clear answer elsewhere, so I think it’s worth showing a solution.

First, as per the documentation on Custom Script Engine Resolvers, we need to pass in the engine.WarnInterpreterOnly=false option.

Create the following custom resolver, manually creating the Engine and setting the option. Note that if you’re using other Scripting Engines, you may need to scope this just to GraalJS via using the language parameter value.

import org.camunda.bpm.engine.impl.scripting.engine.DefaultScriptEngineResolver;
import org.graalvm.polyglot.Context;
import org.graalvm.polyglot.Engine;

import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;

public class GraalScriptEngineResolver extends DefaultScriptEngineResolver {

    public GraalScriptEngineResolver(ScriptEngineManager scriptEngineManager) {

    protected ScriptEngine getJavaScriptScriptEngine(String language) {
        Engine graalEngine = Engine.newBuilder()
                .option("engine.WarnInterpreterOnly", "false")

        return GraalJSScriptEngine.create(graalEngine, Context.newBuilder("js"));

You can then use this in your Process Engine Configuration as follows:

var config = ProcessEngineConfiguration.createStandaloneInMemProcessEngineConfiguration();
((ProcessEngineConfigurationImpl)config).setScriptEngineResolver(new GraalScriptEngineResolver(new ScriptEngineManager()));

After using this, you should no longer see these log warnings.