flowable/flowable-engine · error · FlowableObjectNotFoundException
no decisions deployed with key
Error message
no decisions deployed with key '${definitionKey}' for deployment id '${deploymentId}' and tenant identifier ${tenantId} What it means
findDeployedLatestDecisionByKeyDeploymentIdAndTenantId throws FlowableObjectNotFoundException when no decision matches the key, deployment id AND tenant identifier triple. It is the tenant-scoped variant of the deployment-pinned lookup.
Solutions
- Deploy with the matching tenantId and confirm via createDecisionQuery().deploymentId(id).decisionKey(key).tenantId(tenantId).list().
- Normalize tenant identifiers (trim, consistent casing) before deployment and lookup.
- Relax the lookup (drop tenant or deployment constraint) if strict pinning isn't required.
Example fix
// before
DecisionEntity d = manager.findDeployedLatestDecisionByKeyDeploymentIdAndTenantId("approveOrder", deploymentId, "tenant-42");
// after
if (dmnRepositoryService.createDecisionQuery().deploymentId(deploymentId)
.decisionKey("approveOrder").tenantId("tenant-42").count() == 0) {
dmnRepositoryService.createDeployment().addClasspathResource("approveOrder.dmn")
.tenantId("tenant-42").deploy();
}
DecisionEntity d = manager.findDeployedLatestDecisionByKeyDeploymentIdAndTenantId("approveOrder", deploymentId, "tenant-42"); Defensive patterns
Strategy: validation
Validate before calling
boolean match = dmnRepositoryService.createDecisionQuery()
.deploymentId(deploymentId).decisionKey(key).tenantId(tenantId).count() > 0; Try / catch
try { return manager.findDeployedLatestDecisionByKeyDeploymentIdAndTenantId(key, deploymentId, tenantId); } catch (FlowableObjectNotFoundException e) { log.error("no decision {} in deployment {} for tenant {}", key, deploymentId, tenantId); throw e; } Prevention
- Keep a registry of (deploymentId, key, tenantId) triples produced at deploy time
- Deploy per-tenant resources with matching tenantId
- Trim/validate tenant ids before any engine call
When it happens
Trigger: Calling findDeployedLatestDecisionByKeyDeploymentIdAndTenantId where the deployment exists but was made under a different tenantId, or the key/deployment/tenant combination never existed.
Common situations: Multi-tenant environments where deployment was done with a null or different tenant; copying deployment ids between tenant environments; tenant id typos or trailing whitespace.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Could not find a deployment with id
- Could not find deployment with id
- Could not find deployment with id
- No channel definition found for key '' for parent…
- No decision found for key
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/0c5dd9f5ee34c4eb.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/persistence/deploy/DeploymentManager.java:117
}
public DecisionEntity findDeployedLatestDecisionByKeyAndDeploymentId(String definitionKey, String deploymentId) {
DecisionEntity definition = decisionEntityManager.findDecisionByDeploymentAndKey(deploymentId, definitionKey);
if (definition == null) {
throw new FlowableObjectNotFoundException("no decisions deployed with key '" + definitionKey +
"' for deployment id '" + deploymentId + "'");
}
definition = resolveDecision(definition).getDecisionEntity();
return definition;
}
public DecisionEntity findDeployedLatestDecisionByKeyDeploymentIdAndTenantId(String definitionKey,
String deploymentId, String tenantId) {
DecisionEntity definition = decisionEntityManager.findDecisionByDeploymentAndKeyAndTenantId(deploymentId, definitionKey, tenantId);
if (definition == null) {
throw new FlowableObjectNotFoundException("no decisions deployed with key '" + definitionKey +
"' for deployment id '" + deploymentId + "' and tenant identifier " + tenantId);
}
definition = resolveDecision(definition).getDecisionEntity();
return definition;
}
public DecisionEntity findDeployedDefinitionByKeyAndVersionAndTenantId(String definitionKey, int definitionVersion, String tenantId) {
DecisionEntity definition = decisionEntityManager.findDecisionByKeyAndVersionAndTenantId(definitionKey, definitionVersion, tenantId);
if (definition == null) {
throw new FlowableObjectNotFoundException("no decision deployed with key = '" + definitionKey + "' and version = '" + definitionVersion + "'");
}
definition = resolveDecision(definition).getDecisionEntity();
return definition;
}
/**View on GitHub (pinned to d6d39ce1c6)