flowable/flowable-engine · error · FlowableIllegalArgumentException

deploymentCategoryExclude is null

Error message

deploymentCategoryExclude is null

What it means

EventDeploymentQueryImpl.deploymentCategoryNotEquals excludes deployments whose category equals the given value. It throws FlowableIllegalArgumentException when the argument is null; the message says 'deploymentCategoryExclude is null' reflecting the internal field name categoryNotEquals.

Solutions

  1. Pass a non-null category string to exclude
  2. Skip the exclusion filter when nothing should be excluded
  3. Default the exclusion variable to a sentinel non-null value or drop the filter

Example fix

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

Strategy: validation

Validate before calling

if (excludedCategory == null || excludedCategory.isEmpty()) { throw new IllegalArgumentException("excluded category required for deploymentCategoryNotEquals()"); }

Type guard

boolean hasText(String s) { return s != null && !s.trim().isEmpty(); }

Try / catch

try { q.deploymentCategoryNotEquals(excluded).list(); } catch (FlowableIllegalArgumentException e) { log.warn("exclusion null, skipping filter"); }

Prevention

When it happens

Trigger: Calling deploymentCategoryNotEquals(null), usually when the category to exclude comes from an optional config value or skip-list entry that is missing.

Common situations: Exclusion lists built from config with missing entries, copy-paste from deploymentCategory() with an unset variable, dynamic filter builders forwarding nulls.

Related errors


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

Appendix: source

Thrown at modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventDeploymentQueryImpl.java:99

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

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

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

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

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

View on GitHub (pinned to d6d39ce1c6)