flowable/flowable-engine · error · ActivitiIllegalArgumentException
categoryNotEquals is null
Error message
categoryNotEquals is null
What it means
ProcessDefinitionQueryImpl.processDefinitionCategoryNotEquals(String) excludes process definitions whose category equals the given value. Flowable throws ActivitiIllegalArgumentException when the value is null, since 'not equals null' cannot be expressed as intended in the query filter.
Source
Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/ProcessDefinitionQueryImpl.java:114
throw new ActivitiIllegalArgumentException("category is null");
}
this.category = category;
return this;
}
@Override
public ProcessDefinitionQueryImpl processDefinitionCategoryLike(String categoryLike) {
if (categoryLike == null) {
throw new ActivitiIllegalArgumentException("categoryLike is null");
}
this.categoryLike = categoryLike;
return this;
}
@Override
public ProcessDefinitionQueryImpl processDefinitionCategoryNotEquals(String categoryNotEquals) {
if (categoryNotEquals == null) {
throw new ActivitiIllegalArgumentException("categoryNotEquals is null");
}
this.categoryNotEquals = categoryNotEquals;
return this;
}
@Override
public ProcessDefinitionQueryImpl processDefinitionName(String name) {
if (name == null) {
throw new ActivitiIllegalArgumentException("name is null");
}
this.name = name;
return this;
}
@Override
public ProcessDefinitionQueryImpl processDefinitionNameLike(String nameLike) {
if (nameLike == null) {
throw new ActivitiIllegalArgumentException("nameLike is null");View on GitHub (pinned to d6d39ce1c6)
Solutions
- Pass a non-null category string to exclude.
- Null-check the exclusion value; skip the filter when none is specified.
- Use processDefinitionCategory() instead if you actually want to include one category.
- Catch ActivitiIllegalArgumentException to report invalid query parameters.
Example fix
// before
query.processDefinitionCategoryNotEquals(excludedCategory); // may be null
// after
if (excludedCategory != null) {
query.processDefinitionCategoryNotEquals(excludedCategory);
} Defensive patterns
Strategy: validation
Validate before calling
if (categoryNotEquals != null && !categoryNotEquals.isEmpty()) {
query.processDefinitionCategoryNotEquals(categoryNotEquals);
} Type guard
boolean hasExclusion(String v) { return v != null && !v.isEmpty(); } Try / catch
try {
query.processDefinitionCategoryNotEquals(excluded);
} catch (org.activiti.engine.ActivitiIllegalArgumentException e) {
throw new BadRequestException("categoryNotEquals requires a non-null value", e);
} Prevention
- Only add exclusion filters when an explicit value is configured.
- Distinguish 'no filter' from 'exclude nothing' explicitly in your filter model.
- Validate exclusion values at the API boundary.
When it happens
Trigger: Calling processDefinitionQuery.processDefinitionCategoryNotEquals(null), often when an exclusion value is conditionally set.
Common situations: Building 'exclude category X' features where X comes from user input or config that is missing; copying filter maps with absent keys directly into the query.
Related errors
- category is null
- categoryLike is null
- name is null
- process definition id is null
- process definition id is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/2937184114712e3d.
Report an issue: GitHub.