flowable/flowable-engine · error · FlowableObjectNotFoundException
Could not find a channel definition with id
Error message
Could not find a channel definition with id '${channelDefinitionId}'. What it means
FlowableObjectNotFoundException thrown by BaseEventDefinitionResource.getChannelDefinitionFromRequest when repositoryService.getChannelDefinition(id) returns null. The channel definition id does not exist in the event registry repository.
Solutions
- List channel definitions via GET /event-registry-repository/repository/channel-definitions and use a returned id.
- Verify the id comes from the event registry engine, not another Flowable engine.
- Redeploy the channel model if the definition was removed by cleanup.
Example fix
// before
ChannelDefinition cd = repoService.getChannelDefinition("chan-99");
// after
ChannelDefinition cd = repoService.createChannelDefinitionQuery().channelDefinitionKey("orderChannel").latestVersion().singleResult(); Defensive patterns
Strategy: try-catch
Validate before calling
boolean exists = repositoryService.createChannelDefinitionQuery().channelDefinitionId(id).count() > 0;
Try / catch
try { ... } catch (FlowableObjectNotFoundException e) { return ResponseEntity.status(404).build(); } Prevention
- Resolve channel ids by key from the current deployment version
- Verify environment-specific databases before hardcoding ids
When it happens
Trigger: GET /event-registry-repository/repository/channel-definitions/{channelDefinitionId} with an id that was never deployed or has been removed.
Common situations: Confusing channel definition ids with event definition ids, stale references after redeployment, or pointing at an environment where the channel was never deployed.
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
- Could not find a channel definition with id
- ${aonfe.getMessage()}
- Batch part with id ' ' does not have a batch part document.
- Batch with id ' ' does not have a batch document.
- Case definition does not have a start form defined
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/5b50cf8029c24790.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-event-registry-rest/src/main/java/org/flowable/eventregistry/rest/service/api/repository/BaseEventDefinitionResource.java:62
if (eventDefinition == null) {
throw new FlowableObjectNotFoundException("Could not find an event definition with id '" + eventDefinitionId + "'.", EventDefinition.class);
}
if (restApiInterceptor != null) {
restApiInterceptor.accessEventDefinitionById(eventDefinition);
}
return eventDefinition;
}
/**
* Returns the {@link ChannelDefinition} that is requested. Throws the right exceptions when bad request was made or definition was not found.
*/
protected ChannelDefinition getChannelDefinitionFromRequest(String channelDefinitionId) {
ChannelDefinition channelDefinition = repositoryService.getChannelDefinition(channelDefinitionId);
if (channelDefinition == null) {
throw new FlowableObjectNotFoundException("Could not find a channel definition with id '" + channelDefinitionId + "'.", ChannelDefinition.class);
}
if (restApiInterceptor != null) {
restApiInterceptor.accessChannelDefinitionById(channelDefinition);
}
return channelDefinition;
}
}
View on GitHub (pinned to d6d39ce1c6)