flowable/flowable-engine · error · UnsupportedOperationException
Function has more than one local name
Error message
Function has more than one local name
What it means
Like prefix(), the singular localName() accessor is only valid when the function is registered under exactly one local name. AbstractFlowableVariableExpressionFunction subclasses may declare multiple name options (functionNamesOptions, e.g. vars:get / vars:getArray). Calling localName() in the multi-name case throws UnsupportedOperationException by design; use localNames().
Solutions
- Use localNames() and iterate the returned collection.
- Construct the function with a single name option if a singular localName is needed.
- Update consumer code to support multiple local names per function.
Example fix
// before
String name = function.localName();
// after
for (String name : function.localNames()) { register(function.prefixes(), name, ...); } Defensive patterns
Strategy: type-guard
Validate before calling
if (function.localNames().size() != 1) {
// must use localNames()
} Type guard
String safeLocalName(AbstractFlowableVariableExpressionFunction f) {
return f.localNames().size() == 1 ? f.localNames().iterator().next() : null;
} Try / catch
try {
String n = function.localName();
} catch (UnsupportedOperationException e) {
// multi-name function: iterate function.localNames() instead
} Prevention
- Prefer localNames() in all generic function-registration/introspection code.
- Remember Flowable functions may have aliases (e.g. vars:get, variables:get).
- Add unit coverage for tooling against multi-alias functions.
When it happens
Trigger: Calling localName() on a function subclass that was constructed with more than one function name option; generic tooling that resolves an EL function's name via the singular accessor.
Common situations: Custom function registration or documentation tooling iterating Flowable functions and reading localName(); a subclass updated to accept multiple aliases while callers still call localName().
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Function has more than one prefix
- error.function.access
- Programmatic error: could not find method on class
- Variable name passed is null
- Variable type must be byte[] or string
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/12948a57f74ea9a4.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/el/function/AbstractFlowableVariableExpressionFunction.java:82
return method;
}
}
throw new FlowableException("Programmatic error: could not find method " + functionName + " on class " + this.getClass());
}
@Override
public String prefix() {
throw new UnsupportedOperationException("Function has more than one prefix");
}
@Override
public Collection<String> prefixes() {
return FUNCTION_PREFIXES;
}
@Override
public String localName() {
throw new UnsupportedOperationException("Function has more than one local name");
}
@Override
public Collection<String> localNames() {
return functionNamesOptions;
}
@Override
public Method functionMethod() {
if (method != null) {
return method;
}
method = findMethod(functionName);
return method;
}
// Helper methodsView on GitHub (pinned to d6d39ce1c6)