flowable/flowable-engine · error · FlowableIllegalArgumentException
Variable name passed is null
Error message
Variable name passed is null
What it means
Helper getVariableValue in AbstractFlowableVariableExpressionFunction validates that the variable name argument passed to an EL function such as vars:get / vars:exists is non-null before reading it from the VariableContainer. A null name cannot identify any variable, so a FlowableIllegalArgumentException is thrown.
Solutions
- Pass a literal or non-null computed variable name to the EL function.
- Guard the argument in the expression, e.g. ${myName != null ? vars:get(myName) : null} or use vars:isEmpty with a literal name.
- Fix the upstream logic that produced a null name.
- In Java code calling the function helper directly, assert the name is non-null before invoking.
Example fix
// before (expression)
${vars:get(someNameThatMayBeNull)}
// after
${someNameThatMayBeNull != null ? vars:get(someNameThatMayBeNull) : null} Defensive patterns
Strategy: validation
Validate before calling
Object name = resolveName(); // EL function argument
if (name == null) {
return null; // or throw a domain-specific error before calling vars:get
} Type guard
boolean isNonEmptyString(Object o) { return o instanceof String && !((String) o).isEmpty(); } Try / catch
try {
Object v = expressionManager.evaluateExpression(expr, execution);
} catch (FlowableIllegalArgumentException e) {
if (e.getMessage() != null && e.getMessage().contains("null")) {
log.warn("EL function called with null variable name");
}
throw e;
} Prevention
- Use literal variable names in vars:get/vars:exists calls wherever possible.
- Null-check dynamic name sources before using them as function arguments.
- Avoid chaining lookups where one result feeds another as a variable name.
When it happens
Trigger: Evaluating an expression like ${vars:get(null)} or a function call where the variableName argument resolves to null (e.g. from another expression or variable that is null).
Common situations: Expression built dynamically where a name parameter variable is null at runtime; copy-paste/refactoring leaving a null literal as the function argument; chained expressions where an earlier lookup returned null and its result is used as the variable name.
Related errors
- Cannot set value of '', it's readonly!
- error.function.access
- error.method.notypes
- error.value.notype
- error.value.notype
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/af4313318f21515d.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/el/function/AbstractFlowableVariableExpressionFunction.java:104
public Collection<String> localNames() {
return functionNamesOptions;
}
@Override
public Method functionMethod() {
if (method != null) {
return method;
}
method = findMethod(functionName);
return method;
}
// Helper methods
protected static Object getVariableValue(VariableContainer variableContainer, String variableName) {
if (variableName == null) {
throw new FlowableIllegalArgumentException("Variable name passed is null");
}
return variableContainer.getVariable(variableName);
}
protected static boolean valuesAreNumbers(Object variableValue, Object actualValue) {
return actualValue instanceof Number && variableValue instanceof Number;
}
@Override
public Collection<String> getFunctionNames() {
Collection<String> functionNames = new LinkedHashSet<>();
for (String functionPrefix : prefixes()) {
for (String functionNameOption : localNames()) {
functionNames.add(functionPrefix + ":" + functionNameOption);
}
}
return functionNames;View on GitHub (pinned to d6d39ce1c6)