flowable/flowable-engine · error · FlowableIllegalArgumentException

name is null

Error message

name is null

What it means

FlowableIllegalArgumentException thrown by CaseDefinitionQueryImpl.caseDefinitionName(String) when the given case definition name is null. The CMMN engine's query API validates every filter setter up front so that invalid queries fail fast at construction time rather than producing broken SQL at execution time. Passing null to an exact-match filter is never allowed; omit the call entirely instead of filtering on null.

Source

Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CaseDefinitionQueryImpl.java:123

            throw new FlowableIllegalArgumentException("categoryLike is null");
        }
        this.categoryLike = categoryLike;
        return this;
    }

    @Override
    public CaseDefinitionQueryImpl caseDefinitionCategoryNotEquals(String categoryNotEquals) {
        if (categoryNotEquals == null) {
            throw new FlowableIllegalArgumentException("categoryNotEquals is null");
        }
        this.categoryNotEquals = categoryNotEquals;
        return this;
    }

    @Override
    public CaseDefinitionQueryImpl caseDefinitionName(String name) {
        if (name == null) {
            throw new FlowableIllegalArgumentException("name is null");
        }
        this.name = name;
        return this;
    }

    @Override
    public CaseDefinitionQueryImpl caseDefinitionNameLike(String nameLike) {
        if (nameLike == null) {
            throw new FlowableIllegalArgumentException("nameLike is null");
        }
        this.nameLike = nameLike;
        return this;
    }

    @Override
    public CaseDefinitionQueryImpl caseDefinitionNameLikeIgnoreCase(String nameLikeIgnoreCase) {
        if (nameLikeIgnoreCase == null) {
            throw new FlowableIllegalArgumentException("nameLikeIgnoreCase is null");

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Pass a non-null definition name string, e.g. caseDefinitionName("myCase").
  2. If the name is optional, only call caseDefinitionName when it is non-null (conditional chaining).
  3. Trace where the null originates (missing config/request field) and fix the upstream producer or default it.

Example fix

// before
String name = request.getParameter("name"); // may be null
query.caseDefinitionName(name); // throws

// after
String name = request.getParameter("name");
if (name != null) {
    query.caseDefinitionName(name);
}
Defensive patterns

Strategy: validation

Validate before calling

if (name != null) {
    query.caseDefinitionName(name);
}

Type guard

boolean hasName = name != null && !name.isEmpty();

Try / catch

try {
    query.caseDefinitionName(name);
} catch (FlowableIllegalArgumentException e) {
    // name was null — fall back to unfiltered query or rethrow with context
}

Prevention

When it happens

Trigger: Calling repositoryService.createCaseDefinitionQuery().caseDefinitionName(null) — directly or when a caller-supplied variable that was expected to hold a definition name is null.

Common situations: Developers wiring optional filters from config or request parameters (e.g. a REST query param that was absent) and passing the null variable straight into caseDefinitionName instead of skipping the setter.

Related errors


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