{"record":{"id":"abbe7d4baf68e243","repo":"flowable/flowable-engine","slug":"unknown-method-used-in-expression","errorCode":null,"errorMessage":"Unknown method used in expression: ","messagePattern":"Unknown method used in expression: ","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/el/JuelExpression.java","lineNumber":56,"sourceCode":"    public JuelExpression(ExpressionManager expressionManager, ValueExpression valueExpression, String expressionText) {\n        this.valueExpression = valueExpression;\n        this.expressionText = expressionText;\n        this.expressionManager = expressionManager;\n    }\n    \n    @Override\n    public Object getValue(VariableContainer variableContainer) {\n        ELContext elContext = expressionManager.getElContext(variableContainer);\n        Object originalVariableContainer = elContext.getContext(VariableContainer.class);\n        elContext.putContext(VariableContainer.class, variableContainer);\n        Object originalValueContext = elContext.getContext(EvaluationState.class);\n        elContext.putContext(EvaluationState.class, EvaluationState.READ);\n        try {\n            return resolveGetValueExpression(elContext);\n        } catch (PropertyNotFoundException pnfe) {\n            throw new FlowableException(\"Unknown property used in expression: \" + expressionText + \" with \" + variableContainer, pnfe);\n        } catch (MethodNotFoundException mnfe) {\n            throw new FlowableException(\"Unknown method used in expression: \" + expressionText + \" with \" + variableContainer, mnfe);\n        } catch (FlowableException ex) {\n            throw ex;\n        } catch (Exception e) {\n            throw new FlowableException(\"Error while evaluating expression: \" + expressionText + \" with \" + variableContainer, e);\n        } finally {\n            elContext.putContext(EvaluationState.class, originalValueContext);\n            elContext.putContext(VariableContainer.class, originalVariableContainer);\n        }\n    }\n\n    protected Object resolveGetValueExpression(ELContext elContext) {\n        return valueExpression.getValue(elContext);\n    }\n\n    @Override\n    public void setValue(Object value, VariableContainer variableContainer) {\n        ELContext elContext = expressionManager.getElContext(variableContainer);\n        Object originalVariableContainer = elContext.getContext(VariableContainer.class);","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/el/JuelExpression.java#L38-L74","documentation":"JuelExpression.getValue wraps MethodNotFoundException in FlowableException('Unknown method used in expression: <expr> with <variableContainer>'). The expression invoked a method that does not exist on the resolved target or with non-matching argument types, so Flowable rethrows it as an engine FlowableException including the expression text.","triggerScenarios":"Expressions like ${myBean.doThing(order)} where the method name is wrong, the method signature/arity doesn't match, or the target object doesn't expose the method.","commonSituations":"Renaming or overloading a bean method without updating process definitions; wrong number/type of arguments in the expression; bean not registered so the resolver cannot find any matching method.","solutions":["Compare the method name and argument list in the expression with the actual bean class signature","Ensure the bean (Spring bean or Flowable beans map entry) is registered and in scope for the evaluation","Match parameter types exactly — EL does no implicit conversion beyond basic coercion, so e.g. a String won't bind to an int parameter"],"exampleFix":"// before\n${orderService.caldculate(order)}\n// after\n${orderService.calculate(order)}","handlingStrategy":"try-catch","validationCode":"// verify before evaluating ${bean.method(x)}\nboolean methodExists = bean != null && java.util.Arrays.stream(bean.getClass().getMethods()).anyMatch(m -> m.getName().equals(\"method\"));","typeGuard":null,"tryCatchPattern":"try { value = expr.getValue(ctx); } catch (FlowableException e) { if (e.getCause() instanceof MethodNotFoundException) { throw new IllegalStateException(\"Expression calls a method that does not exist on the target bean\", e); } throw e; }","preventionTips":["Match method names and parameter counts/types exactly in expressions","Ensure beans referenced in expressions are registered and reachable at evaluation time","Add integration tests covering every expression used in process definitions"],"tags":["java","expression","method-not-found","flowable"],"backgroundTag":"resource-not-found","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}