flowable/flowable-engine · error · FlowableIllegalArgumentException

ids are null

Error message

ids are null

What it means

FlowableIllegalArgumentException thrown by CaseDefinitionQueryImpl.deploymentIds(Set<String>) when the deployment id set is null. Batch filters must receive a populated collection; null cannot be distinguished from 'no filter', so the engine treats it as a programming error. An empty set is rejected separately (see next error).

Source

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

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

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

    @Override
    public CaseDefinitionQueryImpl deploymentIds(Set<String> deploymentIds) {
        if (deploymentIds == null) {
            throw new FlowableIllegalArgumentException("ids are null");
        } else if (deploymentIds.isEmpty()) {
            throw new FlowableIllegalArgumentException("ids is an empty collection");
        }
        this.deploymentIds = deploymentIds;
        return this;
    }

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

    @Override
    public CaseDefinitionQueryImpl caseDefinitionKey(String key) {

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Pass a non-null Set containing the deployment ids to filter on.
  2. If no ids were found and you intend 'match nothing', return early or handle the empty result instead of calling deploymentIds.
  3. Initialize the collection (e.g. new HashSet<>()) before the query-building code.

Example fix

// before
Set<String> ids = findDeploymentIds(); // may return null
query.deploymentIds(ids);

// after
Set<String> ids = findDeploymentIds();
if (ids != null && !ids.isEmpty()) {
    query.deploymentIds(ids);
}
Defensive patterns

Strategy: validation

Validate before calling

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

Type guard

boolean hasIds = deploymentIds != null && !deploymentIds.isEmpty();

Try / catch

try {
    query.deploymentIds(deploymentIds);
} catch (FlowableIllegalArgumentException e) {
    // null or empty set — decide: skip filter or return empty result
}

Prevention

When it happens

Trigger: Calling caseDefinitionQuery.deploymentIds(null), typically when a list of deployment ids was never initialized or a lookup returned null.

Common situations: Multi-tenant or batch scripts assembling deployment id sets from configuration or previous queries; the collection variable stayed null when no matching deployments were found.

Related errors


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