flowable/flowable-engine · error · FlowableObjectNotFoundException
No process instance found for id =
Error message
No process instance found for id = '${processInstanceId}'. What it means
Thrown by SetProcessInstanceDueDateCmd.execute when no execution exists for the supplied id, as a FlowableObjectNotFoundException with ProcessInstance.class. The target process instance is not present in the runtime tables.
Solutions
- Pre-check existence with RuntimeService.createProcessInstanceQuery().processInstanceId(id).
- Catch FlowableObjectNotFoundException and skip/no-op for instances that ended in the meantime.
- Verify you are pointed at the correct datasource where the instance lives.
Example fix
// before
runtimeService.setProcessInstanceDueDate(id, dueDate);
// after
if (runtimeService.createProcessInstanceQuery().processInstanceId(id).count() > 0) {
runtimeService.setProcessInstanceDueDate(id, dueDate);
} Defensive patterns
Strategy: try-catch
Validate before calling
boolean exists = runtimeService.createProcessInstanceQuery()
.processInstanceId(processInstanceId).count() > 0; Try / catch
try {
runtimeService.setProcessInstanceDueDate(id, dueDate);
} catch (FlowableObjectNotFoundException e) {
if (ProcessInstance.class.equals(e.getObjectClass())) {
// instance ended before due date could be set; skip
}
} Prevention
- For scheduled due-date jobs, expect and handle already-completed instances.
- Pre-check existence when ids come from caches or external systems.
- Confirm the engine is pointed at the intended database/schema.
When it happens
Trigger: RuntimeService.setProcessInstanceDueDate(id, date) where findById(id) returns null: instance completed, id mistyped, wrong database/tenant, or race with process end.
Common situations: Setting due dates from scheduled jobs that fire after the instance already ended, stale cached ids, environment/database misconfiguration.
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 find process instance with id
- Cannot find process instance with id
- No process instance found for id =
- No process instance found for id =
- No process instance found for id =
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/b0caa9cdb9e07569.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/SetProcessInstanceDueDateCmd.java:55
private final String processInstanceId;
private final Date dueDate;
public SetProcessInstanceDueDateCmd(String processInstanceId, Date dueDate) {
if (processInstanceId == null || processInstanceId.isEmpty()) {
throw new FlowableIllegalArgumentException("The process instance id is mandatory, but '" + processInstanceId + "' has been provided.");
}
this.processInstanceId = processInstanceId;
this.dueDate = dueDate;
}
@Override
public Void execute(CommandContext commandContext) {
ExecutionEntityManager executionManager = CommandContextUtil.getExecutionEntityManager(commandContext);
ExecutionEntity processInstance = executionManager.findById(processInstanceId);
if (processInstance == null) {
throw new FlowableObjectNotFoundException("No process instance found for id = '" + processInstanceId + "'.", ProcessInstance.class);
} else if (!processInstance.isProcessInstanceType()) {
throw new FlowableIllegalArgumentException("A process instance id is required, but the provided id " + "'" + processInstanceId + "' " + "points to a child execution of process instance " + "'"
+ processInstance.getProcessInstanceId() + "'. " + "Please invoke the " + getClass().getSimpleName() + " with a root execution id.");
}
executionManager.updateProcessInstanceDueDate(processInstance, dueDate);
return null;
}
}
View on GitHub (pinned to d6d39ce1c6)