flowable/flowable-engine · error · FlowableIllegalArgumentException

parentDeploymentId is null

Error message

parentDeploymentId is null

What it means

DmnDeploymentQueryImpl.parentDeploymentId(String) throws FlowableIllegalArgumentException when called with a null argument. The Flowable DMN query API validates every query criterion eagerly: a null filter value would silently produce a broken or unfiltered SQL query, so the engine rejects it immediately at the fluent-builder call site rather than at query execution.

Source

Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/DmnDeploymentQueryImpl.java:130

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

    @Override
    public DmnDeploymentQueryImpl deploymentWithoutTenantId() {
        this.withoutTenantId = true;
        return this;
    }

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

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

    @Override
    public DmnDeploymentQueryImpl decisionKey(String key) {
        if (key == null) {
            throw new FlowableIllegalArgumentException("key is null");

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Ensure parentDeploymentId is assigned a non-null deployment id string before invoking parentDeploymentId(...)
  2. Skip the parentDeploymentId(...) call entirely when the value is null (the builder is fluent; omitting it yields an unfiltered-by-parent query)
  3. Wrap the call in a null check or Objects.requireNonNull with a domain-specific message to fail earlier with better context

Example fix

// before
String parentId = config.get("parentDeploymentId");
DmnDeploymentQuery q = repoService.createDeploymentQuery().parentDeploymentId(parentId);
// after
String parentId = config.get("parentDeploymentId");
DmnDeploymentQuery q = repoService.createDeploymentQuery();
if (parentId != null) {
    q = q.parentDeploymentId(parentId);
}
Defensive patterns

Strategy: validation

Validate before calling

if (parentDeploymentId == null) { throw new IllegalArgumentException("parentDeploymentId must be set before querying"); }

Type guard

boolean hasParentDeploymentId(String id) { return id != null && !id.isEmpty(); }

Try / catch

try { query.parentDeploymentId(id); } catch (FlowableIllegalArgumentException e) { log.warn("Skipping parentDeploymentId filter: {}", e.getMessage()); }

Prevention

When it happens

Trigger: Calling dmnRepositoryService.createDeploymentQuery().parentDeploymentId(null), typically when the parent deployment id comes from an uninitialized variable, a missing map entry, or an optional configuration value that was never resolved.

Common situations: Building dynamic deployment queries where the parent deployment id is read from a properties file, database row, or request parameter that is absent; refactoring code that removed a default value; passing the result of an earlier query that returned no rows.

Related errors


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