flowable/flowable-engine · error · FlowableObjectNotFoundException
no decisions deployed with key
Error message
no decisions deployed with key '${definitionKey}' for tenant identifier '${tenantId}' What it means
findDeployedLatestDefinitionByKeyAndTenantId throws FlowableObjectNotFoundException when no decision with the key exists for the given tenant identifier. Flowable partitions DMN definitions per tenant; the lookup filters both on key and TENANT_ID_, and a null result is reported as not found.
Solutions
- Deploy the DMN resource with the same tenantId: dmnRepositoryService.createDeployment().tenantId(tenantId)...deploy().
- Verify existing deployments via createDecisionQuery().decisionKey(key).tenantId(tenantId).list().
- If the decision is tenant-agnostic, look it up with a null tenantId (findDeployedLatestDefinitionByKey) instead.
Example fix
// before
DecisionEntity d = manager.findDeployedLatestDefinitionByKeyAndTenantId("approveOrder", "tenant-42"); // not found
// after
dmnRepositoryService.createDeployment()
.addClasspathResource("approveOrder.dmn")
.tenantId("tenant-42")
.deploy();
DecisionEntity d = manager.findDeployedLatestDefinitionByKeyAndTenantId("approveOrder", "tenant-42"); Defensive patterns
Strategy: validation
Validate before calling
boolean tenantDeployed = dmnRepositoryService.createDecisionQuery()
.latest().decisionKey(key).tenantId(tenantId).count() > 0; Try / catch
try { return manager.findDeployedLatestDefinitionByKeyAndTenantId(key, tenantId); } catch (FlowableObjectNotFoundException e) { log.error("decision {} missing for tenant {}", key, tenantId); throw e; } Prevention
- Deploy DMN resources with the tenantId that will execute them
- Normalize tenant ids (trim/case) consistently
- Audit per-tenant decision coverage on startup
When it happens
Trigger: Calling findDeployedLatestDefinitionByKeyAndTenantId with a tenantId under which the decision was never deployed, or with mismatched key/tenant pairs.
Common situations: Multi-tenant setup where the DMN was deployed for tenant A but the execution runs with tenant B; deployment made without tenantId (null tenant) while lookup uses a tenant id; case-sensitivity or whitespace differences in tenant identifiers.
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
- no decisions deployed with key
- no decisions deployed with key
- Cannot find process definition for key
- Case definition was not found by key
- Case definition was not found by key
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/68616c52ba63c488.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/persistence/deploy/DeploymentManager.java:95
}
return decision;
}
public DecisionEntity findDeployedLatestDefinitionByKey(String definitionKey) {
DecisionEntity definition = decisionEntityManager.findLatestDecisionByKey(definitionKey);
if (definition == null) {
throw new FlowableObjectNotFoundException("no decisions deployed with key '" + definitionKey + "'");
}
definition = resolveDecision(definition).getDecisionEntity();
return definition;
}
public DecisionEntity findDeployedLatestDefinitionByKeyAndTenantId(String definitionKey, String tenantId) {
DecisionEntity definition = decisionEntityManager.findLatestDecisionByKeyAndTenantId(definitionKey, tenantId);
if (definition == null) {
throw new FlowableObjectNotFoundException("no decisions deployed with key '" + definitionKey + "' for tenant identifier '" + tenantId + "'");
}
definition = resolveDecision(definition).getDecisionEntity();
return definition;
}
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) {View on GitHub (pinned to d6d39ce1c6)