{"record":{"id":"e3dda1d436437f5a","repo":"flowable/flowable-engine","slug":"no-decision-table-found-with-id-decisiontableid","errorCode":null,"errorMessage":"No decision table found with id ${decisionTableId}","messagePattern":"No decision table found with id (.+?)","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/util/DecisionUtil.java","lineNumber":71,"sourceCode":"\n        // This will check the cache in the findDeployedDecisionById and resolveDecisionTable method\n        DecisionEntity decisionTableEntity = deploymentManager.findDeployedDecisionById(decisionId);\n        return deploymentManager.resolveDecision(decisionTableEntity).getDmnDefinition();\n    }\n\n    public static DmnDefinition getDmnDefinitionFromCache(String definitionId) {\n        DecisionCacheEntry cacheEntry = CommandContextUtil.getDmnEngineConfiguration().getDefinitionCache().get(definitionId);\n        if (cacheEntry != null) {\n            return cacheEntry.getDmnDefinition();\n        }\n        return null;\n    }\n\n    public static DecisionEntity getDecisionTableFromDatabase(String decisionTableId) {\n        DecisionEntityManager decisionTableEntityManager = CommandContextUtil.getDmnEngineConfiguration().getDecisionEntityManager();\n        DecisionEntity decisionTable = decisionTableEntityManager.findById(decisionTableId);\n        if (decisionTable == null) {\n            throw new FlowableException(\"No decision table found with id \" + decisionTableId);\n        }\n\n        return decisionTable;\n    }\n\n    public static DecisionService getDecisionService(String decisionId) {\n        DmnDefinition dmnDefinition = getDmnDefinitionByDecisionId(decisionId);\n        DecisionService decisionService = dmnDefinition.getDecisionServiceById(decisionId);\n\n        if (decisionService == null) {\n            throw new FlowableObjectNotFoundException(\"Could not find decision service with id: \" + decisionId);\n        }\n\n        return decisionService;\n    }\n}\n","sourceCodeStart":53,"sourceCodeEnd":88,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/util/DecisionUtil.java#L53-L88","documentation":"DecisionUtil.getDecisionTableFromDatabase looks up a DecisionEntity by id through the DecisionEntityManager. When findById returns null — no decision table with that id is persisted in the DMN engine's ACT_DMN_DATABASE tables — it throws FlowableException('No decision table found with id ' + decisionTableId). It signals the id does not correspond to any deployed DMN decision table.","triggerScenarios":"Calling the DMN rule runtime (DmnRuleService/DecisionUtil.getDecisionTableFromDatabase) with a decisionTableId that was never deployed, was deployed to a different database/schema, was deleted, or where the engine configuration points at the wrong datasource.","commonSituations":"Hard-coding ids copied from another environment (dev vs prod database), database not initialized or Flyway/Liquibase migrations missing DMN tables, running against an in-memory H2 that was wiped between restarts, tenant-specific deployments where the id exists only in another tenant, or a version upgrade/redeploy that replaced the id.","solutions":["Verify the id exists by querying the DMN repository (dmnRepositoryService.createDecisionTableQuery().decisionTableId(id).singleResult()) before executing the decision.","Deploy the DMN definition first (DmnDeploymentBuilder.deploy()) and use the id of the newly deployed DecisionEntity instead of a hard-coded value.","Check the DMN engine configuration points at the correct datasource/schema that actually contains the deployment.","Inspect ACT_DMN_DECISION (or equivalent) in the database to confirm the row exists; if not, re-run the deployment."],"exampleFix":"// before\nDecisionEntity decision = dmnRuleService.executeDecisionById(\"myTable-1\", variables); // id may not be deployed\n// after\nDecisionTable dt = dmnRepositoryService.createDecisionTableQuery().decisionTableId(\"myTable-1\").singleResult();\nif (dt == null) {\n    dmnRepositoryService.createDeployment().addClasspathResource(\"dmn/myTable.dmn\").deploy();\n}\nDecisionEntity decision = dmnRuleService.executeDecisionById(\"myTable-1\", variables);","handlingStrategy":"validation","validationCode":"DecisionTable dt = dmnRepositoryService.createDecisionTableQuery()\n    .decisionTableId(decisionTableId)\n    .singleResult();\nif (dt == null) {\n    throw new IllegalStateException(\"Decision table not deployed: \" + decisionTableId);\n}","typeGuard":null,"tryCatchPattern":"try {\n    dmnRuleService.executeDecisionById(decisionTableId, variables);\n} catch (FlowableException e) {\n    if (e.getMessage().startsWith(\"No decision table found with id\")) {\n        // deploy missing definition or fail with a clear message\n        throw new MissingDecisionTableException(decisionTableId, e);\n    }\n    throw e;\n}","preventionTips":["Deploy DMN definitions at startup and resolve ids from deployment results rather than hard-coding them.","Ensure the DMN engine datasource matches the environment whose tables were deployed.","Query the repository before executing decisions in dynamic/multi-tenant setups."],"tags":["java","flowable","database","entity-not-found","dmn"],"backgroundTag":"entity-not-found","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}