flowable/flowable-engine · warning · UnsupportedOperationException

Method getMethodCallSyntax is not supported

Error message

Method getMethodCallSyntax is not supported

What it means

UnsupportedOperationException thrown by JuelScriptEngineFactory.getMethodCallSyntax, which is intentionally not implemented. This is part of the optional javax.script.ScriptEngineFactory API and Flowable's JUEL factory simply does not support it.

Solutions

  1. Do not call getMethodCallSyntax with the JUEL factory; build the method-call string yourself or use another engine that supports it.
  2. Wrap the call defensively: check engine factory type or catch UnsupportedOperationException and fall back to manual string construction.
  3. Use a supported scripting engine (e.g. Groovy/Javascript via ScriptEngineManager) if method-call syntax generation is required.

Example fix

// before
String syntax = factory.getMethodCallSyntax("obj", "foo", "bar");

// after
String syntax;
try {
    syntax = factory.getMethodCallSyntax("obj", "foo", "bar");
} catch (UnsupportedOperationException e) {
    syntax = "obj.foo(bar)";
}
Defensive patterns

Strategy: try-catch

Validate before calling

if (factory instanceof JuelScriptEngineFactory) {
    // getMethodCallSyntax is unsupported — skip
}

Try / catch

try {
    return factory.getMethodCallSyntax(obj, method, args);
} catch (UnsupportedOperationException e) {
    return obj + "." + method + "(" + String.join(", ", args) + ")";
}

Prevention

When it happens

Trigger: Calling getMethodCallSyntax(obj, method, args...) on the JUEL ScriptEngineFactory, typically from generic scripting-framework code (e.g. ScriptEngineManager tooling or IDE/script console introspection).

Common situations: Generic javax.script tooling enumerating engine capabilities; embedding code that assumes all ScriptEngineFactory methods are implemented; building script snippets programmatically against the JUEL engine.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/f5051157ada5e8c4. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/scripting/JuelScriptEngineFactory.java:67

    @Override
    public List<String> getExtensions() {
        return extensions;
    }

    @Override
    public String getLanguageName() {
        return "JSP 2.1 EL";
    }

    @Override
    public String getLanguageVersion() {
        return "2.1";
    }

    @Override
    public String getMethodCallSyntax(String obj, String method, String... arguments) {
        throw new UnsupportedOperationException("Method getMethodCallSyntax is not supported");
    }

    @Override
    public List<String> getMimeTypes() {
        return mimeTypes;
    }

    @Override
    public List<String> getNames() {
        return names;
    }

    @Override
    public String getOutputStatement(String toDisplay) {
        // We will use out:print function to output statements
        StringBuilder stringBuffer = new StringBuilder();
        stringBuffer.append("out:print(\"");

View on GitHub (pinned to d6d39ce1c6)