flowable/flowable-engine · error · FlowableIllegalArgumentException

deploymentCategoryExclude is null

Error message

deploymentCategoryExclude is null

What it means

Thrown by CmmnDeploymentQueryImpl.deploymentCategoryNotEquals(null). The exclusion filter must be a non-null string; null would make the NOT-EQUALS condition undefined, so the setter rejects it immediately with a FlowableIllegalArgumentException.

Solutions

  1. Pass a non-null category string to deploymentCategoryNotEquals()
  2. Conditionally call the setter only when an exclusion is actually desired
  3. Use deploymentCategory() instead if the intent was an inclusion filter

Example fix

// before
query.deploymentCategoryNotEquals(excludeCategory); // may be null
// after
if (excludeCategory != null) {
    query.deploymentCategoryNotEquals(excludeCategory);
}
Defensive patterns

Strategy: validation

Validate before calling

Objects.requireNonNull(excludeCategory, "deploymentCategoryExclude must not be null");
query.deploymentCategoryNotEquals(excludeCategory);

Type guard

boolean hasExclude = excludeCategory != null && !excludeCategory.isEmpty();

Try / catch

try {
    query.deploymentCategoryNotEquals(excludeCategory);
} catch (FlowableIllegalArgumentException e) {
    // log and skip this filter
}

Prevention

When it happens

Trigger: Calling deploymentCategoryNotEquals(null) on a CmmnDeploymentQuery, e.g. when the excluded category is read from config or a request parameter that is absent.

Common situations: Dynamic query builders that always call all filter setters; refactoring that renamed a variable and left it unset; optional REST filter parameters passed straight through.

Related errors


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

Appendix: source

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

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

    @Override
    public CmmnDeploymentQueryImpl deploymentCategory(String deploymentCategory) {
        if (deploymentCategory == null) {
            throw new FlowableIllegalArgumentException("deploymentCategory is null");
        }
        this.category = deploymentCategory;
        return this;
    }

    @Override
    public CmmnDeploymentQueryImpl deploymentCategoryNotEquals(String deploymentCategoryNotEquals) {
        if (deploymentCategoryNotEquals == null) {
            throw new FlowableIllegalArgumentException("deploymentCategoryExclude is null");
        }
        this.categoryNotEquals = deploymentCategoryNotEquals;
        return this;
    }
    
    @Override
    public CmmnDeploymentQueryImpl deploymentKey(String deploymentKey) {
        if (deploymentKey == null) {
            throw new FlowableIllegalArgumentException("deploymentKey is null");
        }
        this.key = deploymentKey;
        return this;
    }

    @Override
    public CmmnDeploymentQueryImpl deploymentTenantId(String tenantId) {
        if (tenantId == null) {
            throw new FlowableIllegalArgumentException("deploymentTenantId is null");

View on GitHub (pinned to d6d39ce1c6)