flowable/flowable-engine · error · ActivitiIllegalArgumentException
Provided execution id is null
Error message
Provided execution id is null
What it means
TimerJobQueryImpl.executionId() throws ActivitiIllegalArgumentException when the execution id argument is null. The query layer rejects null filters up front so the resulting job query is never built from an unset identifier. An execution id identifies the specific execution a timer job is attached to.
Source
Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/TimerJobQueryImpl.java:93
throw new ActivitiIllegalArgumentException("Provided process instance id is null");
}
this.processInstanceId = processInstanceId;
return this;
}
@Override
public TimerJobQueryImpl processDefinitionId(String processDefinitionId) {
if (processDefinitionId == null) {
throw new ActivitiIllegalArgumentException("Provided process definition id is null");
}
this.processDefinitionId = processDefinitionId;
return this;
}
@Override
public TimerJobQueryImpl executionId(String executionId) {
if (executionId == null) {
throw new ActivitiIllegalArgumentException("Provided execution id is null");
}
this.executionId = executionId;
return this;
}
@Override
public TimerJobQuery executable() {
executable = true;
return this;
}
@Override
public TimerJobQuery timers() {
if (onlyMessages) {
throw new ActivitiIllegalArgumentException("Cannot combine onlyTimers() with onlyMessages() in the same query");
}
this.onlyTimers = true;
return this;View on GitHub (pinned to d6d39ce1c6)
Solutions
- Ensure a valid execution id is passed; fetch it via runtimeService.createExecutionQuery() or from the DelegateExecution
- Skip the executionId() filter when the value is null instead of passing it
- Check that the process instance/execution still exists before querying its timer jobs
Example fix
// before
query.executionId(executionId);
// after
if (executionId != null) {
query.executionId(executionId);
} Defensive patterns
Strategy: validation
Validate before calling
if (executionId == null) {
throw new IllegalStateException("executionId is required; execution may have already ended");
}
query.executionId(executionId); Type guard
boolean hasExecutionId(String id) { return id != null && !id.isEmpty(); } Try / catch
try {
query.executionId(executionId);
} catch (ActivitiIllegalArgumentException e) {
throw new IllegalStateException("Execution no longer exists or id was not captured", e);
} Prevention
- Capture the execution id from DelegateExecution while the process is alive
- Check execution existence before querying its jobs
- Guard optional execution context values before applying the filter
When it happens
Trigger: Calling timerJobQuery().executionId(null), usually because the Execution object or its id was null — e.g. after the process instance already ended, or the variable holding the execution was never assigned.
Common situations: Querying timers for an execution that already completed (execution no longer exists, stored reference is null); async listener code reading a stale execution reference; wiring an optional execution context parameter through without a null check.
Related errors
- Provided process definition id is null
- Provided exception message is null
- Provided date is null
- Provided exception message is null
- Provided tenant id is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/fb7f7d17780fe51c.
Report an issue: GitHub.