flowable/flowable-engine · error · FlowableIllegalArgumentException
nameLike is null
Error message
nameLike is null
What it means
Flowable throws FlowableIllegalArgumentException when processDefinitionNameLike(null) is called on a ProcessDefinitionQuery. The query API validates its builder arguments eagerly so that bad filters fail at query-construction time instead of producing confusing empty results or SQL issues later. A null 'like' pattern is meaningless as a name filter.
Source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/ProcessDefinitionQueryImpl.java:139
throw new FlowableIllegalArgumentException("categoryNotEquals is null");
}
this.categoryNotEquals = categoryNotEquals;
return this;
}
@Override
public ProcessDefinitionQueryImpl processDefinitionName(String name) {
if (name == null) {
throw new FlowableIllegalArgumentException("name is null");
}
this.name = name;
return this;
}
@Override
public ProcessDefinitionQueryImpl processDefinitionNameLike(String nameLike) {
if (nameLike == null) {
throw new FlowableIllegalArgumentException("nameLike is null");
}
this.nameLike = nameLike;
return this;
}
@Override
public ProcessDefinitionQueryImpl processDefinitionNameLikeIgnoreCase(String nameLikeIgnoreCase) {
if (nameLikeIgnoreCase == null) {
throw new FlowableIllegalArgumentException("nameLikeIgnoreCase is null");
}
this.nameLikeIgnoreCase = nameLikeIgnoreCase;
return this;
}
@Override
public ProcessDefinitionQueryImpl deploymentId(String deploymentId) {
if (deploymentId == null) {
throw new FlowableIllegalArgumentException("id is null");View on GitHub (pinned to d6d39ce1c6)
Solutions
- Pass a non-null like pattern, e.g. processDefinitionNameLike("%order%").
- Only add the nameLike filter when the value is non-null: if (nameLike != null) query.processDefinitionNameLike(nameLike);
- Wrap the call in try-catch for FlowableIllegalArgumentException if the value comes from untrusted input, and surface a clear validation message.
Example fix
// before
String nameFilter = request.getName(); // may be null
ProcessDefinitionQuery q = repoService.createProcessDefinitionQuery()
.processDefinitionNameLike(nameFilter);
// after
String nameFilter = request.getName();
ProcessDefinitionQuery q = repoService.createProcessDefinitionQuery();
if (nameFilter != null) {
q = q.processDefinitionNameLike(nameFilter);
} Defensive patterns
Strategy: validation
Validate before calling
if (nameLike == null || nameLike.isEmpty()) { throw new IllegalArgumentException("nameLike must be a non-empty string"); }
query.processDefinitionNameLike(nameLike); Type guard
boolean isValidPattern(String s) { return s != null && !s.isEmpty(); } Try / catch
try {
query.processDefinitionNameLike(nameLike);
} catch (org.flowable.common.engine.api.FlowableIllegalArgumentException e) {
throw new BadRequestException("Invalid nameLike filter: " + e.getMessage());
} Prevention
- Treat all query filter strings as Optional and only apply non-null values
- Validate user input at the API boundary before building Flowable queries
- Never pass optional UI filter fields straight into the builder chain
When it happens
Trigger: Calling new ProcessDefinitionQueryImpl().processDefinitionNameLike(null) or the public API repositoryService.createProcessDefinitionQuery().processDefinitionNameLike(nameLike) with nameLike == null (e.g. when a user-supplied filter string was never initialized).
Common situations: Building dynamic queries from optional UI filters where the name filter variable stays null; deserializing query criteria from JSON where the field is absent; refactoring code that used processDefinitionName (which may also reject null) into the like variant.
Related errors
- Error retrieving app engine info
- No deployment id available
- No resource name available
- variableNames are null or empty
- nameLikeIgnoreCase is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/4039d684fb52a672.
Report an issue: GitHub.