{"record":{"id":"f5051157ada5e8c4","repo":"flowable/flowable-engine","slug":"method-getmethodcallsyntax-is-not-supported","errorCode":null,"errorMessage":"Method getMethodCallSyntax is not supported","messagePattern":"Method getMethodCallSyntax is not supported","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"warning","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/scripting/JuelScriptEngineFactory.java","lineNumber":67,"sourceCode":"\n    @Override\n    public List<String> getExtensions() {\n        return extensions;\n    }\n\n    @Override\n    public String getLanguageName() {\n        return \"JSP 2.1 EL\";\n    }\n\n    @Override\n    public String getLanguageVersion() {\n        return \"2.1\";\n    }\n\n    @Override\n    public String getMethodCallSyntax(String obj, String method, String... arguments) {\n        throw new UnsupportedOperationException(\"Method getMethodCallSyntax is not supported\");\n    }\n\n    @Override\n    public List<String> getMimeTypes() {\n        return mimeTypes;\n    }\n\n    @Override\n    public List<String> getNames() {\n        return names;\n    }\n\n    @Override\n    public String getOutputStatement(String toDisplay) {\n        // We will use out:print function to output statements\n        StringBuilder stringBuffer = new StringBuilder();\n        stringBuffer.append(\"out:print(\\\"\");\n","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/scripting/JuelScriptEngineFactory.java#L49-L85","documentation":"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.","triggerScenarios":"Calling getMethodCallSyntax(obj, method, args...) on the JUEL ScriptEngineFactory, typically from generic scripting-framework code (e.g. ScriptEngineManager tooling or IDE/script console introspection).","commonSituations":"Generic javax.script tooling enumerating engine capabilities; embedding code that assumes all ScriptEngineFactory methods are implemented; building script snippets programmatically against the JUEL engine.","solutions":["Do not call getMethodCallSyntax with the JUEL factory; build the method-call string yourself or use another engine that supports it.","Wrap the call defensively: check engine factory type or catch UnsupportedOperationException and fall back to manual string construction.","Use a supported scripting engine (e.g. Groovy/Javascript via ScriptEngineManager) if method-call syntax generation is required."],"exampleFix":"// before\nString syntax = factory.getMethodCallSyntax(\"obj\", \"foo\", \"bar\");\n\n// after\nString syntax;\ntry {\n    syntax = factory.getMethodCallSyntax(\"obj\", \"foo\", \"bar\");\n} catch (UnsupportedOperationException e) {\n    syntax = \"obj.foo(bar)\";\n}","handlingStrategy":"try-catch","validationCode":"if (factory instanceof JuelScriptEngineFactory) {\n    // getMethodCallSyntax is unsupported — skip\n}","typeGuard":null,"tryCatchPattern":"try {\n    return factory.getMethodCallSyntax(obj, method, args);\n} catch (UnsupportedOperationException e) {\n    return obj + \".\" + method + \"(\" + String.join(\", \", args) + \")\";\n}","preventionTips":["Do not assume all javax.script factories implement optional methods","Check engine capabilities before generic scripting tooling calls","Document that JUEL factory supports only core factory methods"],"tags":["flowable","scripting","juel","unsupported-operation"],"backgroundTag":"method-not-implemented","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}