flowable/flowable-engine · error · FlowableIllegalArgumentException

deploymentCategory is null

Error message

deploymentCategory is null

What it means

AppDeploymentQueryImpl.deploymentCategory() throws FlowableIllegalArgumentException when the category argument is null. Category filtering requires an explicit value; the builder rejects null before the query executes.

Source

Thrown at modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/repository/AppDeploymentQueryImpl.java:96

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

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

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

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

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Verify the category constant/config value is set before querying.
  2. Conditionally add the filter only when category != null.
  3. Check that the app was actually deployed with a category if results matter (set it at deploy time with .category(...)).
  4. Catch FlowableIllegalArgumentException and surface a validation message.

Example fix

// before
query.deploymentCategory(category); // may be null
// after
if (category != null) query.deploymentCategory(category);
Defensive patterns

Strategy: validation

Validate before calling

if (category != null) query.deploymentCategory(category);

Try / catch

try {
    query.deploymentCategory(category);
} catch (org.flowable.common.engine.api.FlowableIllegalArgumentException e) {
    throw new javax.ws.rs.BadRequestException("category must not be null", e);
}

Prevention

When it happens

Trigger: Calling deploymentCategory(null) with a category constant that is unset, e.g. read from a config property that does not exist.

Common situations: Environment-specific category configured in one environment but missing in another; optional category filter in an admin UI passed through as null.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


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