{"record":{"id":"f236dbaadca372d0","repo":"flowable/flowable-engine","slug":"no-decision-found-for-key-decisionkey-and-parent","errorCode":null,"errorMessage":"No decision found for key <decisionKey> and parent deployment id <parentDeploymentId>. There was also no fall back decision found without parent deployment id.","messagePattern":"No decision found for key <decisionKey> and parent deployment id <parentDeploymentId>\\. There was also no fall back decision found without parent deployment id\\.","errorType":"exception","errorClass":"FlowableObjectNotFoundException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/cmd/AbstractExecuteDecisionCmd.java","lineNumber":134,"sourceCode":"                }\n            }\n            \n        } else if (StringUtils.isNotEmpty(decisionKey) && StringUtils.isNotEmpty(parentDeploymentId) &&\n                        !dmnEngineConfiguration.isAlwaysLookupLatestDefinitionVersion()) {\n            \n            List<DmnDeployment> dmnDeployments = CommandContextUtil.getDeploymentEntityManager().findDeploymentsByQueryCriteria(\n                new DmnDeploymentQueryImpl().parentDeploymentId(parentDeploymentId));\n\n            if (dmnDeployments != null && dmnDeployments.size() != 0) {\n                decision = decisionEntityManager.findDecisionByDeploymentAndKey(dmnDeployments.get(0).getId(), decisionKey);\n            }\n\n            if (decision == null) {\n                // If there is no decision table found linked to the deployment id, try to find one without a specific deployment id.\n                decision = decisionEntityManager.findLatestDecisionByKey(decisionKey);\n\n                if (decision == null) {\n                    throw new FlowableObjectNotFoundException(\"No decision found for key: \" + decisionKey +\n                        \" and parent deployment id \" + parentDeploymentId +\n                        \". There was also no fall back decision found without parent deployment id.\");\n                }\n            }\n            \n        } else if (StringUtils.isNotEmpty(decisionKey) && StringUtils.isNotEmpty(tenantId)) {\n            decision = decisionEntityManager.findLatestDecisionByKeyAndTenantId(decisionKey, tenantId);\n            if (decision == null) {\n                if (executeDecisionContext.isFallbackToDefaultTenant() || dmnEngineConfiguration.isFallbackToDefaultTenant()) {\n                    String defaultTenant = dmnEngineConfiguration.getDefaultTenantProvider().getDefaultTenant(tenantId, ScopeTypes.DMN, decisionKey);\n                    if (StringUtils.isNotEmpty(defaultTenant)) {\n                        decision = decisionEntityManager.findLatestDecisionByKeyAndTenantId(decisionKey, defaultTenant);\n                        if (decision == null) {\n                            throw new FlowableObjectNotFoundException(\"No decision found for key: \" + decisionKey +\n                                \". There was also no fall back decision found for default tenant \" +\n                                defaultTenant + \".\");\n                        }\n","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/cmd/AbstractExecuteDecisionCmd.java#L116-L152","documentation":"Flowable DMN throws this FlowableObjectNotFoundException when a decision is looked up by key and parent deployment id and no Decision exists for that pair, and the fallback lookup without the deployment id (findLatestDecisionByKey) also returns null. Execution stops because no deployed decision definition matches the key.","triggerScenarios":"Executing a decision with decisionKey and parentDeploymentId set (no tenantId) where findDecisionByKeyAndParentDeploymentId and the fallback findLatestDecisionByKey both return null.","commonSituations":"Parent deployment id points to a deployment that does not contain the decision; decision key misspelled; decision never deployed; deployment cascade-deleted; decision deployed under a different tenant so tenant-scoped queries can't see it.","solutions":["Query DmnRepositoryService.createDecisionQuery().decisionKey(key) to confirm the decision exists at all; if not, deploy the .dmn resource.","Remove or fix the parentDeploymentId so the fallback findLatestDecisionByKey can resolve the latest deployed version.","Correct the decision key (check the id inside the .dmn XML).","Redeploy the DMN model into the deployment referenced by parentDeploymentId if deployment pinning is required."],"exampleFix":"// before\nbuilder.decisionKey(\"orderApproval\").parentDeploymentId(\"stale-deployment-id\");\n// after\nif (dmnRepositoryService.createDecisionQuery().decisionKey(\"orderApproval\").count() == 0) {\n    dmnRepositoryService.createDeployment().addClasspathResource(\"dmn/orderApproval.dmn\").deploy();\n}\nbuilder.decisionKey(\"orderApproval\"); // let fallback find latest by key","handlingStrategy":"validation","validationCode":"if (dmnRepositoryService.createDecisionQuery().decisionKey(key).count() == 0) {\n    throw new IllegalStateException(\"Decision \" + key + \" not deployed\");\n}","typeGuard":null,"tryCatchPattern":"try { dmnEngine.executeDecision(builder.decisionKey(key).parentDeploymentId(dep)); }\ncatch (FlowableObjectNotFoundException e) { log.warn(\"Falling back: {}\", e.getMessage()); dmnEngine.executeDecision(builder.decisionKey(key)); }","preventionTips":["Confirm parentDeploymentId matches the deployment that actually contains the decision","Use deployment queries to link decisions to deployments before pinning to one","Correct decision keys are the id attribute in the .dmn XML — verify before use"],"tags":["dmn","deployment","not-found"],"backgroundTag":"resource-not-found","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}