flowable/flowable-engine · error · FlowableIllegalArgumentException

Case definition category is null

Error message

Case definition category is null

What it means

CaseInstanceQueryImpl.caseDefinitionCategory filters by the category declared on the case definition and throws FlowableIllegalArgumentException when the argument is null. As with the other query filters, omitting the filter is done by not calling the method, never by passing null.

Solutions

  1. Pass the actual category string, e.g. "http://flowable.org/cmmn".
  2. Only call caseDefinitionCategory when the value is non-null.
  3. Validate/trim category inputs at the service boundary.

Example fix

// before
query.caseDefinitionCategory(filter.getCategory()).list();
// after
if (filter.getCategory() != null) {
    query = query.caseDefinitionCategory(filter.getCategory());
}
query.list();
Defensive patterns

Strategy: validation

Validate before calling

if (category != null) {
    query = query.caseDefinitionCategory(category);
}

Prevention

When it happens

Trigger: createCaseInstanceQuery().caseDefinitionCategory(null), typically from an optional category request parameter.

Common situations: Category facets in search UIs where the user cleared the selection; category metadata missing from deployment descriptors so the lookup yields null.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/d5419e8942e0bcc4. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/runtime/CaseInstanceQueryImpl.java:209

    }
    
    @Override
    public CaseInstanceQueryImpl caseDefinitionKeyLikeIgnoreCase(String caseDefinitionKeyLikeIgnoreCase) {
        if (caseDefinitionKeyLikeIgnoreCase == null) {
            throw new FlowableIllegalArgumentException("Case definition key is null");
        }
        if (inOrStatement) {
            this.currentOrQueryObject.caseDefinitionKeyLikeIgnoreCase = caseDefinitionKeyLikeIgnoreCase;
        } else {
            this.caseDefinitionKeyLikeIgnoreCase = caseDefinitionKeyLikeIgnoreCase;
        }
        return this;
    }

    @Override
    public CaseInstanceQueryImpl caseDefinitionCategory(String caseDefinitionCategory) {
        if (caseDefinitionCategory == null) {
            throw new FlowableIllegalArgumentException("Case definition category is null");
        }

        if (inOrStatement) {
            this.currentOrQueryObject.caseDefinitionCategory = caseDefinitionCategory;
        } else {
            this.caseDefinitionCategory = caseDefinitionCategory;
        }
        return this;
    }
    
    @Override
    public CaseInstanceQueryImpl caseDefinitionCategoryLike(String caseDefinitionCategoryLike) {
        if (caseDefinitionCategoryLike == null) {
            throw new FlowableIllegalArgumentException("Case definition category is null");
        }

        if (inOrStatement) {
            this.currentOrQueryObject.caseDefinitionCategoryLike = caseDefinitionCategoryLike;

View on GitHub (pinned to d6d39ce1c6)