flowable/flowable-engine · error · FlowableIllegalArgumentException

Provided execution id is null

Error message

Provided execution id is null

What it means

DeadLetterJobQueryImpl.executionId() throws FlowableIllegalArgumentException when the executionId parameter is null. The execution id scopes dead-letter jobs to a BPMN process execution; null is not a valid filter value, so Flowable rejects it during query construction. This mirrors the null checks on all other id-based filters in the query impl.

Source

Thrown at modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/DeadLetterJobQueryImpl.java:380

    }

    @Override
    public DeadLetterJobQuery correlationId(String correlationId) {
        if (correlationId == null) {
            throw new FlowableIllegalArgumentException("Provided correlationId is null");
        }
        if (inOrStatement) {
            this.currentOrQueryObject.correlationId = correlationId;
        } else {
            this.correlationId = correlationId;
        }
        return this;
    }

    @Override
    public DeadLetterJobQueryImpl executionId(String executionId) {
        if (executionId == null) {
            throw new FlowableIllegalArgumentException("Provided execution id is null");
        }
        if (inOrStatement) {
            this.currentOrQueryObject.executionId = executionId;
        } else {
            this.executionId = executionId;
        }
        return this;
    }

    @Override
    public DeadLetterJobQueryImpl handlerType(String handlerType) {
        if (handlerType == null) {
            throw new FlowableIllegalArgumentException("Provided handlerType is null");
        }
        if (inOrStatement) {
            this.currentOrQueryObject.handlerType = handlerType;
        } else {
            this.handlerType = handlerType;

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Null-check the execution id before calling executionId and skip the filter if optional.
  2. Verify the execution exists: runtimeService.createExecutionQuery().executionId(id).singleResult().
  3. For jobs not tied to an execution, filter by processInstanceId or handlerType instead.

Example fix

// before
query.executionId(job.getExecutionId());
// after
if (job.getExecutionId() != null) {
    query.executionId(job.getExecutionId());
}
Defensive patterns

Strategy: validation

Validate before calling

if (executionId == null) { return Collections.emptyList(); }
return managementService.createDeadLetterJobQuery().executionId(executionId).list();

Type guard

boolean hasExecutionId(String id) { return id != null && id.startsWith("execution"); }

Try / catch

try { query.executionId(execId); } catch (FlowableIllegalArgumentException e) { log.warn("Null execution id supplied to dead-letter job query"); }

Prevention

When it happens

Trigger: Calling deadLetterJobQuery().executionId(null) with an execution id resolved from a process instance, job entity, or variable that was null, including within or() blocks.

Common situations: Process instance already ended and purged so its execution id no longer resolves; job entity with null executionId (e.g. process-level vs case-level jobs); copying ids between environments where the id does not exist.

Related errors


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