flowable/flowable-engine · error · FlowableIllegalArgumentException

Provided execution id is null

Error message

Provided execution id is null

What it means

FlowableIllegalArgumentException thrown by TimerJobQueryImpl.executionId(String) when the caller passes a null execution id. The query API validates arguments eagerly so that a null filter never reaches the SQL layer, where it would silently change semantics or fail obscurely. Fix by passing a non-null execution id string.

Source

Thrown at modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/TimerJobQueryImpl.java:379

    }

    @Override
    public TimerJobQueryImpl 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 TimerJobQueryImpl 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 TimerJobQueryImpl 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. Pass a valid non-null execution id string to executionId().
  2. Guard the call: only invoke executionId() when the value is non-null.
  3. Use executionIdLike(...) or a different filter if you intended a pattern match.
  4. Verify the source object (e.g. execution.getId()) is not null before querying.

Example fix

// before
timerJobQuery.executionId(myExecutionId);
// after
if (myExecutionId != null) {
    timerJobQuery.executionId(myExecutionId);
}
Defensive patterns

Strategy: type-guard

Validate before calling

if (executionId == null || executionId.isEmpty()) throw new IllegalArgumentException("executionId required before querying timer jobs");

Type guard

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

Try / catch

try { timerJobQuery.executionId(executionId); } catch (FlowableIllegalArgumentException e) { log.warn("Skipping executionId filter: {}", e.getMessage()); }

Prevention

When it happens

Trigger: Calling timerJobQuery().executionId(null) directly, or passing a variable/field holding execution id that is null (e.g. a DelegateExecution id captured before assignment).

Common situations: Building dynamic queries in custom Java delegates where the execution id comes from an unset process variable; refactoring that renamed a variable leaving it null; Spring beans injecting values after query construction.

Related errors


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