flowable/flowable-engine · error · FlowableObjectNotFoundException
no decisions deployed with key
Error message
no decisions deployed with key '${definitionKey}' for deployment id '${deploymentId}' What it means
findDeployedLatestDecisionByKeyAndDeploymentId throws FlowableObjectNotFoundException when the given deployment does not contain a decision with the given key (findDecisionByDeploymentAndKey returns null). This pins the lookup to one specific deployment's version of the decision.
Solutions
- Confirm the decision is in that deployment: createDecisionQuery().deploymentId(id).decisionKey(key).list().
- Use the correct deploymentId that actually contains the decision, or fall back to findDeployedLatestDefinitionByKey for the latest across deployments.
- Redeploy the DMN resource with the expected key into that deployment.
Example fix
// before
DecisionEntity d = manager.findDeployedLatestDecisionByKeyAndDeploymentId("approveOrder", wrongDeploymentId);
// after
if (dmnRepositoryService.createDecisionQuery().deploymentId(deploymentId).decisionKey("approveOrder").count() == 0) {
throw new FlowableObjectNotFoundException("decision not in deployment " + deploymentId);
}
DecisionEntity d = manager.findDeployedLatestDecisionByKeyAndDeploymentId("approveOrder", deploymentId); Defensive patterns
Strategy: validation
Validate before calling
boolean inDeployment = dmnRepositoryService.createDecisionQuery()
.deploymentId(deploymentId).decisionKey(key).count() > 0; Try / catch
try { return manager.findDeployedLatestDecisionByKeyAndDeploymentId(key, deploymentId); } catch (FlowableObjectNotFoundException e) { return manager.findDeployedLatestDefinitionByKey(key); /* fallback */ } Prevention
- Capture the deploymentId returned at deploy time and store it with the referencing config
- Don't assume a key exists in every deployment
- Prefer latest-by-key lookups unless strict deployment pinning is required
When it happens
Trigger: Calling findDeployedLatestDecisionByKeyAndDeploymentId with a deploymentId that doesn't include the decision, or a key that wasn't part of that deployment.
Common situations: Mixing deployment ids across environments; the .dmn file with that key was removed in a later deployment; key renamed inside the deployed resource while callers still use the old key.
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
- no decision deployed with key =
- no decisions deployed with key
- no decisions deployed with key
- Could not find a deployment with id ''.
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/06eba4f7ce5fdf94.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/persistence/deploy/DeploymentManager.java:105
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) {
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;
}
View on GitHub (pinned to d6d39ce1c6)