flowable/flowable-engine · error · FlowableIllegalArgumentException

parentDeploymentId is null

Error message

parentDeploymentId is null

What it means

FlowableIllegalArgumentException thrown by CaseDefinitionQueryImpl.parentDeploymentId(String) when the parent deployment id is null. Parent deployment is used to scope case definitions to the deployment they were derived from (e.g. in app/deployment hierarchies); a null value is not a valid scope and is rejected at query-build time.

Source

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

        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) {
        if (key == null) {
            throw new FlowableIllegalArgumentException("key is null");
        }
        this.key = key;
        return this;
    }

    @Override
    public CaseDefinitionQueryImpl caseDefinitionKeyLike(String keyLike) {
        if (keyLike == null) {
            throw new FlowableIllegalArgumentException("keyLike is null");

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Pass a valid parent deployment id string.
  2. Only call parentDeploymentId when the id is known and non-null.
  3. Ensure the parent deployment exists and its id was correctly resolved before building the query.

Example fix

// before
query.parentDeploymentId(parentId); // may be null

// after
if (parentId != null) {
    query.parentDeploymentId(parentId);
}
Defensive patterns

Strategy: validation

Validate before calling

if (parentDeploymentId != null) {
    query.parentDeploymentId(parentDeploymentId);
}

Type guard

boolean hasParent = parentDeploymentId != null && !parentDeploymentId.isEmpty();

Try / catch

try {
    query.parentDeploymentId(parentDeploymentId);
} catch (FlowableIllegalArgumentException e) {
    // parent id unresolved — log and query without the parent scope
}

Prevention

When it happens

Trigger: Calling caseDefinitionQuery.parentDeploymentId(null), typically when the parent deployment reference is missing from configuration or a lookup.

Common situations: Code paths using Flowable app-engine style deployments where the parent deployment id variable was never resolved (missing app deployment, failed install step).

Related errors


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