flowable/flowable-engine · error · FlowableIllegalArgumentException
Process category list is empty
Error message
Process category list is empty
What it means
TaskQueryImpl.processCategoryIn() rejects an empty collection with FlowableIllegalArgumentException. An empty IN list would produce invalid or never-matching SQL, so Flowable fails fast instead of returning misleading empty results.
Solutions
- Check !categories.isEmpty() before calling processCategoryIn
- Omit the filter entirely when the list is empty
- Provide at least one category, or use a different query path for 'any category'
Example fix
// before
query.processCategoryIn(selectedCategories); // throws when empty
// after
if (selectedCategories != null && !selectedCategories.isEmpty()) {
query.processCategoryIn(selectedCategories);
} Defensive patterns
Strategy: validation
Validate before calling
if (selectedCategories != null && !selectedCategories.isEmpty()) {
query.processCategoryIn(selectedCategories);
} Type guard
boolean isUsableCategoryList(Collection<String> c) { return c != null && !c.isEmpty(); } Try / catch
try {
query.processCategoryIn(selectedCategories);
} catch (FlowableIllegalArgumentException e) {
if (e.getMessage().contains("list is empty")) { /* omit filter */ }
else throw e;
} Prevention
- Skip collection criteria when the collection is empty
- Never call IN-style filters with empty lists
- Decide explicitly what 'no categories selected' means in your query layer
When it happens
Trigger: Calling processCategoryIn(Collections.emptyList()) or with a collection that had all elements removed before the query was built.
Common situations: Category list loaded from config/database that came back empty; user deselected all categories in a UI and the code still applies the filter.
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
- Involved groups are empty
- Process instance id list is empty
- Task assignee list is empty
- Task category list is empty
- at least one of userId or groups must be provided
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/9cb6527105915899.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/TaskQueryImpl.java:1735
}
@Override
public TaskQuery processDefinitionNameLike(String processDefinitionNameLike) {
if (orActive) {
currentOrQueryObject.processDefinitionNameLike = processDefinitionNameLike;
} else {
this.processDefinitionNameLike = processDefinitionNameLike;
}
return this;
}
@Override
public TaskQuery processCategoryIn(Collection<String> processCategoryInList) {
if (processCategoryInList == null) {
throw new FlowableIllegalArgumentException("Process category list is null");
}
if (processCategoryInList.isEmpty()) {
throw new FlowableIllegalArgumentException("Process category list is empty");
}
for (String processCategory : processCategoryInList) {
if (processCategory == null) {
throw new FlowableIllegalArgumentException("None of the given process categories can be null");
}
}
if (orActive) {
currentOrQueryObject.processCategoryInList = processCategoryInList;
} else {
this.processCategoryInList = processCategoryInList;
}
return this;
}
@Override
public TaskQuery processCategoryNotIn(Collection<String> processCategoryNotInList) {
if (processCategoryNotInList == null) {View on GitHub (pinned to d6d39ce1c6)