flowable/flowable-engine · error · FlowableIllegalArgumentException

executionId is null

Error message

executionId is null

What it means

HistoricDecisionExecutionQueryImpl.executionId(String) throws FlowableIllegalArgumentException when the executionId argument is null. The execution id links a historic decision execution to the process execution that triggered it; a null value is rejected in the builder to prevent malformed queries.

Source

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

            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");
        }
        this.instanceId = instanceId;
        return this;
    }
    
    @Override
    public DmnHistoricDecisionExecutionQuery executionId(String executionId) {
        if (executionId == null) {
            throw new FlowableIllegalArgumentException("executionId is null");
        }
        this.executionId = executionId;
        return this;
    }
    
    @Override
    public DmnHistoricDecisionExecutionQuery activityId(String activityId) {
        if (activityId == null) {
            throw new FlowableIllegalArgumentException("activityId is null");
        }
        this.activityId = activityId;
        return this;
    }
    
    @Override
    public DmnHistoricDecisionExecutionQuery scopeType(String scopeType) {
        if (scopeType == null) {
            throw new FlowableIllegalArgumentException("scopeType is null");

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Capture the execution id while the execution is still active and pass that stored value
  2. Skip the executionId(...) filter when the value is null and rely on other criteria (instanceId, decisionKey)
  3. Null-check the execution lookup result before using its id

Example fix

// before
query.executionId(currentExecution.getId()); // currentExecution may be null
// after
if (currentExecution != null && currentExecution.getId() != null) {
    query.executionId(currentExecution.getId());
}
Defensive patterns

Strategy: validation

Validate before calling

if (executionId == null) { throw new IllegalArgumentException("executionId must be captured while the execution is active"); }

Type guard

boolean hasExecutionId(DelegateExecution ex) { return ex != null && ex.getId() != null; }

Try / catch

try { query.executionId(exId); } catch (FlowableIllegalArgumentException e) { log.warn("executionId filter omitted: {}", e.getMessage()); }

Prevention

When it happens

Trigger: Calling dmnHistoryService.createHistoricDecisionExecutionQuery().executionId(null), typically when the execution reference is unavailable (standalone decision evaluation) or read from a stale/completed execution object.

Common situations: Correlating decision history to process executions where the execution already terminated and its id was never stored; generic history-report code that always applies an executionId filter; unit tests invoking the DMN engine outside a process context.

Related errors


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