flowable/flowable-engine · error · FlowableObjectNotFoundException
No plan item instance found for id
Error message
No plan item instance found for id
What it means
RescheduleTimerJobCmd reschedules the timer job attached to a CMMN plan item (event listener) instance. When an eventListenerInstanceId is provided it loads the plan item instance first and throws FlowableObjectNotFoundException if none exists with that id.
Source
Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/cmd/RescheduleTimerJobCmd.java:59
protected String newDateValue;
public RescheduleTimerJobCmd(String eventListenerInstanceId, String jobId, Date newDueDate, String newDateValue) {
this.eventListenerInstanceId = eventListenerInstanceId;
this.jobId = jobId;
this.newDueDate = newDueDate;
this.newDateValue = newDateValue;
}
@Override
public Job execute(CommandContext commandContext) {
String timerJobId = null;
PlanItemInstance planItemInstance = null;
JobService jobService = CommandContextUtil.getJobService(commandContext);
if (eventListenerInstanceId != null) {
planItemInstance = CommandContextUtil.getPlanItemInstanceEntityManager(commandContext).findById(eventListenerInstanceId);
if (planItemInstance == null) {
throw new FlowableObjectNotFoundException("No plan item instance found for id " + eventListenerInstanceId);
}
List<Job> timerJobs = jobService.createTimerJobQuery().planItemInstanceId(eventListenerInstanceId).list();
if (timerJobs == null || timerJobs.isEmpty()) {
throw new FlowableException("No timer jobs found for plan item instance " + eventListenerInstanceId);
}
if (timerJobs.size() > 1) {
throw new FlowableException("Multiple timer jobs found for plan item instance " + eventListenerInstanceId);
}
timerJobId = timerJobs.get(0).getId();
} else {
timerJobId = jobId;
}
TimerJobService timerJobService = CommandContextUtil.getTimerJobService(commandContext);View on GitHub (pinned to d6d39ce1c6)
Solutions
- Verify the id via cmmnRuntimeService.createPlanItemInstanceQuery().planItemInstanceId(id)
- Ensure you pass the event listener's plan item instance id, not another plan item type's id
- Reschedule before case completion, or handle FlowableObjectNotFoundException for finished cases
- Check engine/database consistency in multi-environment setups
Example fix
// before
cmmnRuntimeService.rescheduleTimerJob(eventListenerInstanceId, null, newDate);
// after
if (cmmnRuntimeService.createPlanItemInstanceQuery().planItemInstanceId(eventListenerInstanceId).count() == 0) {
throw new IllegalStateException("Event listener " + eventListenerInstanceId + " does not exist");
}
cmmnRuntimeService.rescheduleTimerJob(eventListenerInstanceId, null, newDate); Defensive patterns
Strategy: validation
Validate before calling
boolean exists = cmmnRuntimeService.createPlanItemInstanceQuery().planItemInstanceId(eventListenerInstanceId).count() > 0;
Try / catch
try { reschedule(...); } catch (FlowableObjectNotFoundException e) { log.warn("Event listener {} not found", eventListenerInstanceId); } Prevention
- Only pass event listener plan item ids to reschedule APIs
- Reschedule timers before case completion
- Confirm the id source and target database match
When it happens
Trigger: Calling the reschedule API with an eventListenerInstanceId that is unknown, was deleted with its case, or belongs to another database; also when a non-listener plan item id is passed by mistake.
Common situations: Rescheduling after the case finished and entities were historized; using a human task plan item id where an event listener id is expected; config/test data referencing purged instances.
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
- Timer job not found for id
- No case instance found for id ${caseInstanceEntityId}
- DMN decision with key ${externalRef} was not executed. For $
- Cannot find case instance for id ${caseInstanceId}
- Cannot find plan item instance for id ${planItemInstanceId}
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/6f19927cf80d7562.
Report an issue: GitHub.