flowable/flowable-engine · error · FlowableIllegalArgumentException
category is null
Error message
category is null
What it means
FlowableIllegalArgumentException thrown by AppDefinitionQueryImpl.appDefinitionCategory when the category argument is null. Categories filter app definitions by their category string, and null is rejected in favor of the dedicated appDefinitionCategoryLike or no-filter approaches.
Source
Thrown at modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/repository/AppDefinitionQueryImpl.java:86
this.id = appDefinitionId;
return this;
}
@Override
public AppDefinitionQuery appDefinitionIds(Set<String> appsDefinitionIds) {
if (appsDefinitionIds == null) {
throw new FlowableIllegalArgumentException("appsDefinitionIds is null");
} else if (appsDefinitionIds.isEmpty()) {
throw new FlowableIllegalArgumentException("Empty appsDefinitionIds");
}
this.ids = appsDefinitionIds;
return this;
}
@Override
public AppDefinitionQueryImpl appDefinitionCategory(String category) {
if (category == null) {
throw new FlowableIllegalArgumentException("category is null");
}
this.category = category;
return this;
}
@Override
public AppDefinitionQueryImpl appDefinitionCategoryLike(String categoryLike) {
if (categoryLike == null) {
throw new FlowableIllegalArgumentException("categoryLike is null");
}
this.categoryLike = categoryLike;
return this;
}
@Override
public AppDefinitionQueryImpl appDefinitionCategoryNotEquals(String categoryNotEquals) {
if (categoryNotEquals == null) {
throw new FlowableIllegalArgumentException("categoryNotEquals is null");View on GitHub (pinned to d6d39ce1c6)
Solutions
- Only call appDefinitionCategory when the value is non-null; otherwise leave the filter off
- Default the category to a concrete value or use appDefinitionCategoryLike("%...") for patterns
- Validate/normalize the incoming category parameter before building the query
Example fix
// before
query.appDefinitionCategory(config.getCategory()); // may be null
// after
if (config.getCategory() != null) { query.appDefinitionCategory(config.getCategory()); } Defensive patterns
Strategy: type-guard
Validate before calling
if (category != null) {
query.appDefinitionCategory(category);
} Type guard
boolean hasCategory(String category) { return category != null && !category.trim().isEmpty(); } Try / catch
try {
query.appDefinitionCategory(category);
} catch (FlowableIllegalArgumentException e) {
// omit the category filter or apply a default
} Prevention
- Make category filters conditional on presence
- Provide a configured default category value
- Normalize optional filter inputs (null -> no filter) centrally
When it happens
Trigger: Calling appDefinitionQuery.appDefinitionCategory(null), commonly when the category comes from an unset config value, optional request parameter, or a lookup that returned null.
Common situations: Optional category filter wired straight from a null config/request value; user submitted no category; code assumed a default category that was never configured.
Related errors
- appsDefinitionIds is null
- query is null
- parentScopeIds is null or empty
- Business status is null
- Case definition keys is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/64f154340649c1ce.
Report an issue: GitHub.