flowable/flowable-engine · error · FlowableIllegalArgumentException

deploymentId is null

Error message

deploymentId is null

What it means

HistoricDecisionExecutionQueryImpl.deploymentId(String) throws FlowableIllegalArgumentException when the deployment id argument is null. Flowable validates null criteria eagerly in the query builder because a null deployment id cannot be translated into a meaningful database filter.

Source

Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/HistoricDecisionExecutionQueryImpl.java:90

    @Override
    public DmnHistoricDecisionExecutionQuery ids(Set<String> ids) {
        this.ids = ids;
        return this;
    }

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

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

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Ensure a valid DMN deployment id (from dmnRepositoryService.createDeployment().deploy()) is passed
  2. Guard the call: only chain deploymentId(...) when the id is non-null, otherwise query without that filter
  3. Check upstream lookup code (deployments by key/time) for silent empty results producing null

Example fix

// before
query.deploymentId(lastDeploymentId); // may be null when no deployments exist
// after
if (lastDeploymentId != null) {
    query.deploymentId(lastDeploymentId);
}
Defensive patterns

Strategy: validation

Validate before calling

if (deploymentId == null) { throw new IllegalArgumentException("deploymentId must be provided"); }

Type guard

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

Try / catch

try { query.deploymentId(depId); } catch (FlowableIllegalArgumentException e) { log.warn("No deployment id available; querying without deployment filter"); }

Prevention

When it happens

Trigger: Calling dmnHistoryService.createHistoricDecisionExecutionQuery().deploymentId(null), typically when the deployment id was never captured (e.g. the deployment step was skipped) or comes from an unset configuration/variable.

Common situations: History cleanup or audit tooling parameterized by deployment id where the variable is uninitialized; integration tests that forgot to deploy a DMN deployment before querying; API handlers forwarding an absent request parameter.

Related errors


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