flowable/flowable-engine · error · FlowableException
Unknown method used in expression:
Error message
Unknown method used in expression:
What it means
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.
Source
Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/el/JuelExpression.java:56
public JuelExpression(ExpressionManager expressionManager, ValueExpression valueExpression, String expressionText) {
this.valueExpression = valueExpression;
this.expressionText = expressionText;
this.expressionManager = expressionManager;
}
@Override
public Object getValue(VariableContainer variableContainer) {
ELContext elContext = expressionManager.getElContext(variableContainer);
Object originalVariableContainer = elContext.getContext(VariableContainer.class);
elContext.putContext(VariableContainer.class, variableContainer);
Object originalValueContext = elContext.getContext(EvaluationState.class);
elContext.putContext(EvaluationState.class, EvaluationState.READ);
try {
return resolveGetValueExpression(elContext);
} catch (PropertyNotFoundException pnfe) {
throw new FlowableException("Unknown property used in expression: " + expressionText + " with " + variableContainer, pnfe);
} catch (MethodNotFoundException mnfe) {
throw new FlowableException("Unknown method used in expression: " + expressionText + " with " + variableContainer, mnfe);
} catch (FlowableException ex) {
throw ex;
} catch (Exception e) {
throw new FlowableException("Error while evaluating expression: " + expressionText + " with " + variableContainer, e);
} finally {
elContext.putContext(EvaluationState.class, originalValueContext);
elContext.putContext(VariableContainer.class, originalVariableContainer);
}
}
protected Object resolveGetValueExpression(ELContext elContext) {
return valueExpression.getValue(elContext);
}
@Override
public void setValue(Object value, VariableContainer variableContainer) {
ELContext elContext = expressionManager.getElContext(variableContainer);
Object originalVariableContainer = elContext.getContext(VariableContainer.class);View on GitHub (pinned to d6d39ce1c6)
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
Example fix
// before
${orderService.caldculate(order)}
// after
${orderService.calculate(order)} Defensive patterns
Strategy: try-catch
Validate before calling
// verify before evaluating ${bean.method(x)}
boolean methodExists = bean != null && java.util.Arrays.stream(bean.getClass().getMethods()).anyMatch(m -> m.getName().equals("method")); Try / catch
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; } Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Unknown property used in expression:
- Error while evaluating expression:
- Post upgrade expression can't be empty or null.
- text is null
- bytes array is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/abbe7d4baf68e243.
Report an issue: GitHub.