flowable/flowable-engine · error · FlowableIllegalArgumentException
categoryLike is null
Error message
categoryLike is null
What it means
ProcessDefinitionQueryImpl.processDefinitionCategoryLike() filters definitions whose category matches a LIKE pattern, and the pattern must be non-null. Null cannot produce a valid SQL LIKE clause, so the query builder throws FlowableIllegalArgumentException immediately. The pattern itself (e.g. 'http-%') is the caller's responsibility.
Solutions
- Build the LIKE pattern from a validated non-null value before calling the method.
- Guard: if (categoryLike != null) query.processDefinitionCategoryLike(categoryLike);
- Treat empty input as 'no filter' and skip the call.
- Default the pattern in configuration (e.g. '%') when filtering is optional.
Example fix
// before
ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery()
.processDefinitionCategoryLike(params.get("categoryLike"));
// after
ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery();
String categoryLike = params.get("categoryLike");
if (categoryLike != null && !categoryLike.isEmpty()) {
query.processDefinitionCategoryLike(categoryLike);
} Defensive patterns
Strategy: validation
Validate before calling
if (categoryLike != null && !categoryLike.isEmpty()) {
query = repositoryService.createProcessDefinitionQuery().processDefinitionCategoryLike(categoryLike);
} else {
query = repositoryService.createProcessDefinitionQuery();
} Type guard
boolean isValidLikePattern(String p) {
return p != null && !p.trim().isEmpty();
} Try / catch
try {
return repositoryService.createProcessDefinitionQuery().processDefinitionCategoryLike(pattern).list();
} catch (FlowableIllegalArgumentException e) {
log.warn("Null categoryLike pattern: {}", e.getMessage());
throw new BadRequestException("categoryLike must not be null");
} Prevention
- Guard string-concatenated patterns ('%'+v+'%') for null inputs.
- Map empty request parameters to 'no filter' instead of null setters.
- Document expected LIKE syntax (uses SQL wildcards _ and %) for API consumers.
- Cover pattern-building helpers with null-input unit tests.
When it happens
Trigger: Calling processDefinitionCategoryLike(null), typically when the pattern is assembled from a null base value (request param, config key) or the wildcard-building helper returns null for empty input.
Common situations: Search UIs forwarding an empty/absent categoryLike parameter; building '%'+value+'%' where value is null; environment-specific config where the categoryLike filter key is unset.
Related errors
- after time is null
- category is null
- categoryLike is null
- categoryNotEquals is null
- categoryNotEquals is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/5ae6d13b138cb475.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/ProcessDefinitionQueryImpl.java:112
@Override
public ProcessDefinitionQuery processDefinitionIds(Set<String> processDefinitionIds) {
this.ids = processDefinitionIds;
return this;
}
@Override
public ProcessDefinitionQueryImpl processDefinitionCategory(String category) {
if (category == null) {
throw new FlowableIllegalArgumentException("category is null");
}
this.category = category;
return this;
}
@Override
public ProcessDefinitionQueryImpl processDefinitionCategoryLike(String categoryLike) {
if (categoryLike == null) {
throw new FlowableIllegalArgumentException("categoryLike is null");
}
this.categoryLike = categoryLike;
return this;
}
@Override
public ProcessDefinitionQueryImpl processDefinitionCategoryNotEquals(String categoryNotEquals) {
if (categoryNotEquals == null) {
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");View on GitHub (pinned to d6d39ce1c6)