flowable/flowable-engine · error · FlowableObjectNotFoundException
No deployment found for id = '${deploymentId}'
Error message
No deployment found for id = '${deploymentId}' What it means
Lookup failure in SetDeploymentCategoryCmd.execute: deploymentId passed the null check, but no event deployment entity exists with that id, so there is nothing to attach the category to.
Source
Thrown at modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/cmd/SetDeploymentCategoryCmd.java:45
protected String deploymentId;
protected String category;
public SetDeploymentCategoryCmd(String deploymentId, String category) {
this.deploymentId = deploymentId;
this.category = category;
}
@Override
public Void execute(CommandContext commandContext) {
if (deploymentId == null) {
throw new FlowableIllegalArgumentException("Deployment id is null");
}
EventDeploymentEntity deployment = CommandContextUtil.getDeploymentEntityManager(commandContext).findById(deploymentId);
if (deployment == null) {
throw new FlowableObjectNotFoundException("No deployment found for id = '" + deploymentId + "'");
}
// Update category
deployment.setCategory(category);
CommandContextUtil.getDeploymentEntityManager(commandContext).update(deployment);
return null;
}
public String getDeploymentId() {
return deploymentId;
}
public void setDeploymentId(String deploymentId) {
this.deploymentId = deploymentId;
}
public String getCategory() {View on GitHub (pinned to d6d39ce1c6)
Solutions
- Look up the deployment via eventRepositoryService.createDeploymentQuery() to get a current, valid id.
- Confirm the id belongs to an event registry deployment, not a process/form/other engine deployment.
- Redeploy the event definition archive if the deployment was removed.
- Check database connectivity points at the environment where the deployment exists.
Example fix
// before
eventRepositoryService.setDeploymentCategory("bpmn-deploy-9", "events"); // wrong engine's deployment id
// after
EventDeployment dep = eventRepositoryService.createDeploymentQuery().deploymentName("myEvents").singleResult();
eventRepositoryService.setDeploymentCategory(dep.getId(), "events"); Defensive patterns
Strategy: try-catch
Validate before calling
EventDeployment dep = eventRepositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
if (dep == null) throw new IllegalStateException("No event deployment with id " + deploymentId); Type guard
boolean deploymentExists(String id) {
return eventRepositoryService.createDeploymentQuery().deploymentId(id).count() > 0;
} Try / catch
try {
eventRepositoryService.setDeploymentCategory(id, category);
} catch (FlowableObjectNotFoundException e) {
log.warn("Event deployment {} not found; verify engine and environment", id, e);
} Prevention
- Keep engine-specific ids with their engines; never share ids across Flowable engines.
- Re-resolve deployment ids after DB re-initialization or cleanup.
- Use deployment names/keys to fetch current ids at runtime.
When it happens
Trigger: Calling setDeploymentCategory with an id of a deployment that was deleted, never existed in this database, or belongs to another engine (process vs event registry).
Common situations: Passing a BPMN process deployment id to the event registry API; ids from a re-initialized database; deployments purged by cleanup jobs between obtaining the id and using it.
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
- deployment does not exist:
- No event definition found for key '${eventDefinitionKey}' fo
- No event definition found for key '${eventDefinitionKey} for
- Could not find deployment with id ${deploymentId}
- Could not find deployment with id ${deploymentId}
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/80206f31a0d3423c.
Report an issue: GitHub.