flowable/flowable-engine · error · FlowableIllegalArgumentException

deploymentCategoryExclude is null

Error message

deploymentCategoryExclude is null

What it means

DeploymentQueryImpl.deploymentCategoryNotEquals(String) throws FlowableIllegalArgumentException when the argument is null. This filter excludes deployments whose category equals the given value; since excluding null is meaningless, Flowable rejects a null at builder time. The exception message uses the internal name 'deploymentCategoryExclude'.

Solutions

  1. Pass a concrete category string to exclude.
  2. Guard the call: if (excludeCategory != null) query.deploymentCategoryNotEquals(excludeCategory).
  3. If no exclusion is wanted, simply do not call the method.

Example fix

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

Strategy: validation

Validate before calling

if (excludeCategory != null && !excludeCategory.isEmpty()) {
    query.deploymentCategoryNotEquals(excludeCategory);
}

Type guard

boolean hasExcludeCategory(String category) { return category != null && !category.isEmpty(); }

Try / catch

try {
    query.deploymentCategoryNotEquals(excludeCategory);
} catch (FlowableIllegalArgumentException e) {
    log.warn("Null exclusion category ignored", e);
}

Prevention

When it happens

Trigger: repositoryService.createDeploymentQuery().deploymentCategoryNotEquals(null), typically when an exclusion category is optional and null is passed through unconditionally.

Common situations: UI 'exclude category' dropdowns with no selection mapped to null instead of skipping the call; configuration keys for an excluded category that are absent.

Related errors


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

Appendix: source

Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/DeploymentQueryImpl.java:123

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

    @Override
    public DeploymentQueryImpl deploymentCategoryLike(String categoryLike) {
        if (categoryLike == null) {
            throw new FlowableIllegalArgumentException("deploymentCategoryLike is null");
        }
        this.categoryLike = categoryLike;
        return this;
    }

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

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

    @Override
    public DeploymentQueryImpl deploymentKeyLike(String deploymentKeyLike) {
        if (deploymentKeyLike == null) {
            throw new FlowableIllegalArgumentException("deploymentKeyLike is null");

View on GitHub (pinned to d6d39ce1c6)