flowable/flowable-engine · error · FlowableIllegalArgumentException
caseDefinitionIds is null
Error message
caseDefinitionIds is null
What it means
Query-builder validation in CaseDefinitionQueryImpl.caseDefinitionIds: a null Set was passed as the id collection filter. Null is rejected because it would collide with the internal 'no filter' sentinel; use an empty query instead of null.
Solutions
- Only call caseDefinitionIds when the set is non-null; otherwise skip the call to leave the filter unset
- Coalesce null to an existing default set of ids
Example fix
// before
query.caseDefinitionIds(filter.getIds()); // may be null
// after
if (filter.getIds() != null) {
query.caseDefinitionIds(filter.getIds());
} Defensive patterns
Strategy: type-guard
Validate before calling
if (ids == null) { ids = Collections.emptySet(); /* or skip the filter */ } Type guard
boolean usableIds = ids != null && !ids.isEmpty();
Try / catch
try {
query.caseDefinitionIds(ids);
} catch (FlowableIllegalArgumentException e) {
// drop the filter and retry the query without it
} Prevention
- Never call filter setters with null; skip them instead
- Wrap query building in a helper that checks each optional filter
- Distinguish 'no filter' from 'filter with empty value' in your filter-building code
When it happens
Trigger: Calling caseDefinitionQuery.caseDefinitionIds(null) to try to remove the filter or ignore it.
Common situations: Code that builds filter sets dynamically and passes through a null when the caller gave no filter; confusion between 'no filter' (simply don't call the method) and 'empty set'.
Related errors
- activatedBefore is null
- assignee is null
- availableAfter is null
- availableBefore is null
- before time is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/486b8cd3fa9ba795.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CaseDefinitionQueryImpl.java:85
public CaseDefinitionQueryImpl(CommandContext commandContext) {
super(commandContext);
}
public CaseDefinitionQueryImpl(CommandExecutor commandExecutor) {
super(commandExecutor);
}
@Override
public CaseDefinitionQueryImpl caseDefinitionId(String caseDefinitionId) {
this.id = caseDefinitionId;
return this;
}
@Override
public CaseDefinitionQuery caseDefinitionIds(Set<String> caseDefinitionIds) {
if (caseDefinitionIds == null) {
throw new FlowableIllegalArgumentException("caseDefinitionIds is null");
} else if (caseDefinitionIds.isEmpty()) {
throw new FlowableIllegalArgumentException("Empty caseDefinitionIds");
}
this.ids = caseDefinitionIds;
return this;
}
@Override
public CaseDefinitionQueryImpl caseDefinitionCategory(String category) {
if (category == null) {
throw new FlowableIllegalArgumentException("category is null");
}
this.category = category;
return this;
}
@Override
public CaseDefinitionQueryImpl caseDefinitionCategoryLike(String categoryLike) {View on GitHub (pinned to d6d39ce1c6)