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
- Pass a valid non-null execution id string to executionId().
- Guard the call: only invoke executionId() when the value is non-null.
- Use executionIdLike(...) or a different filter if you intended a pattern match.
- 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
- Null-check ids at the source (execution.getId()) before query building
- Build query filters only from validated request parameters
- Prefer Objects.requireNonNull with a clear message when the id is mandatory
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
- appsDefinitionIds is null
- category is null
- query is null
- parentScopeIds is null or empty
- Business status is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/643c8ab104632b65.
Report an issue: GitHub.