flowable/flowable-engine · error · FlowableObjectNotFoundException
execution ${executionId} doesn't exist
Error message
execution ${executionId} doesn't exist What it means
After passing argument validation, GetDataObjectCmd loads the ExecutionEntity by id; if no execution with that id exists it throws FlowableObjectNotFoundException with the message 'execution <id> doesn't exist'. The execution was deleted, never existed, or the id is wrong (or from a different engine/history level).
Source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/GetDataObjectCmd.java:74
this.dataObjectName = dataObjectName;
this.isLocal = isLocal;
this.locale = locale;
this.withLocalizationFallback = withLocalizationFallback;
}
@Override
public DataObject execute(CommandContext commandContext) {
if (executionId == null) {
throw new FlowableIllegalArgumentException("executionId is null");
}
if (dataObjectName == null) {
throw new FlowableIllegalArgumentException("dataObjectName is null");
}
ExecutionEntity execution = CommandContextUtil.getExecutionEntityManager(commandContext).findById(executionId);
if (execution == null) {
throw new FlowableObjectNotFoundException("execution " + executionId + " doesn't exist", Execution.class);
}
DataObject dataObject = null;
VariableInstance variableEntity = null;
if (Flowable5Util.isFlowable5ProcessDefinitionId(commandContext, execution.getProcessDefinitionId())) {
Flowable5CompatibilityHandler compatibilityHandler = Flowable5Util.getFlowable5CompatibilityHandler();
variableEntity = compatibilityHandler.getExecutionVariableInstance(executionId, dataObjectName, isLocal);
} else {
if (isLocal) {
variableEntity = execution.getVariableInstanceLocal(dataObjectName, false);
} else {
variableEntity = execution.getVariableInstance(dataObjectName, false);
}
}
String localizedName = null;View on GitHub (pinned to d6d39ce1c6)
Solutions
- Re-fetch the execution first (runtimeService.createExecutionQuery().executionId(id).singleResult()) and only call getDataObject when it exists
- Use the current process instance id and derive the execution via a query instead of storing long-lived execution ids
- Check for completion before accessing data objects; read data objects during the process lifecycle or via history APIs when ended
- Verify the id targets the correct Flowable engine/database
Example fix
// before
DataObject d = runtimeService.getDataObject(staleExecutionId, "name");
// after
ExecutionEntity exec = (ExecutionEntity) runtimeService.createExecutionQuery().executionId(staleExecutionId).singleResult();
if (exec != null) {
DataObject d = runtimeService.getDataObject(staleExecutionId, "name");
} Defensive patterns
Strategy: try-catch
Validate before calling
Execution e = runtimeService.createExecutionQuery().executionId(executionId).singleResult(); if (e == null) return null; // execution gone
Try / catch
try {
DataObject d = runtimeService.getDataObject(executionId, name);
} catch (FlowableObjectNotFoundException e) {
// execution no longer exists; fall back to history
} Prevention
- Re-query execution existence instead of trusting stored ids
- Use history APIs for finished process instances
- Verify the id belongs to the configured engine/tenant
When it happens
Trigger: runtimeService.getDataObject(executionId, name) with an id of a completed/removed process instance; typo'd or stale execution ids; using a process-instance id where an execution id is required when they differ.
Common situations: Long-running jobs holding an execution id captured before the process ended; multi-tenant setups querying an id that belongs to another engine's datasource; calling data-object APIs from external systems after instance cleanup.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- Cannot associate execution by id: no execution with id '
- Cannot find process instance with id
- No execution found for id ''
- Cannot find process instance with id ${processInstanceId}
- execution ${executionId} doesn't exist
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/323ed34cadbd204c.
Report an issue: GitHub.