flowable/flowable-engine · error · FlowableIllegalArgumentException
name is empty
Error message
name is empty
What it means
InternalVariableInstanceQueryImpl.name(String) requires a non-empty variable name because variables are looked up by their name column. An empty name cannot identify a variable, so FlowableIllegalArgumentException("name is empty") is thrown at InternalVariableInstanceQueryImpl.java:194.
Solutions
- Pass the actual variable name, e.g. query.name("orderStatus").
- Filter empty names out of the list before adding name(...) calls.
- Skip the name(...) call (or use nameLike with a valid pattern) when the name is unknown.
Example fix
// before
for (String n : names) {
query.name(n); // throws if n is ""
}
// after
for (String n : names) {
if (StringUtils.isNotEmpty(n)) {
query.name(n);
}
} Defensive patterns
Strategy: validation
Validate before calling
if (variableName == null || variableName.isEmpty()) {
throw new IllegalArgumentException("variableName must be non-empty");
} Try / catch
try {
query.name(variableName);
} catch (FlowableIllegalArgumentException e) {
log.warn("Skipping empty variable name filter");
} Prevention
- Filter empty entries out of variable-name lists before querying.
- Source variable names from constants/enums where possible.
- Validate user-supplied variable names at the API boundary.
When it happens
Trigger: Calling query.name("") or query.name(null); StringUtils.isEmpty triggers the exception.
Common situations: Variable name sourced from user input, a map key, or a constant that was never initialized; loops iterating over a variable-name list containing an empty entry.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- scopeType is empty
- appsDefinitionIds is null
- Booleans and null cannot be used in 'greater than' condition
- Booleans and null cannot be used in 'greater than or equal'…
- Booleans and null cannot be used in 'less than' condition
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/ba49cc6ad5c50777.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-variable-service/src/main/java/org/flowable/variable/service/impl/InternalVariableInstanceQueryImpl.java:194
@Override
public InternalVariableInstanceQuery scopeType(String scopeType) {
if (StringUtils.isEmpty(scopeType)) {
throw new FlowableIllegalArgumentException("scopeType is empty");
}
this.scopeType = scopeType;
return this;
}
@Override
public InternalVariableInstanceQuery scopeTypes(Collection<String> scopeTypes) {
this.scopeTypes = scopeTypes;
return this;
}
@Override
public InternalVariableInstanceQuery name(String name) {
if (StringUtils.isEmpty(name)) {
throw new FlowableIllegalArgumentException("name is empty");
}
this.name = name;
return this;
}
@Override
public InternalVariableInstanceQuery names(Collection<String> names) {
this.names = names;
return this;
}
@Override
public List<VariableInstanceEntity> list() {
return dataManager.findVariablesInstancesByQuery(this);
}
@Override
public VariableInstanceEntity singleResult() {View on GitHub (pinned to d6d39ce1c6)