{"record":{"id":"5a5b9a619ec1245a","repo":"flowable/flowable-engine","slug":"deployment-deploymentid-didn-t-put-decision","errorCode":null,"errorMessage":"deployment '${deploymentId}' didn't put decision '${decisionId}' in the cache","messagePattern":"deployment '(.+?)' didn't put decision '(.+?)' in the cache","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/persistence/deploy/DeploymentManager.java","lineNumber":156,"sourceCode":"    public DecisionCacheEntry resolveDecision(DmnDecision decision) {\n        String decisionId = decision.getId();\n        String deploymentId = decision.getDeploymentId();\n\n        DecisionCacheEntry cachedDecision = decisionCache.get(decisionId);\n\n        if (cachedDecision == null) {\n            DmnDeploymentEntity deployment = engineConfig.getDeploymentEntityManager().findById(deploymentId);\n            List<DmnResourceEntity> resources = engineConfig.getResourceEntityManager().findResourcesByDeploymentId(deploymentId);\n            for (DmnResourceEntity resource : resources) {\n                deployment.addResource(resource);\n            }\n\n            deployment.setNew(false);\n            deploy(deployment, null);\n            cachedDecision = deployment.getDecisionCacheEntry(decisionId);\n\n            if (cachedDecision == null) {\n                throw new FlowableException(\"deployment '\" + deploymentId + \"' didn't put decision '\" + decisionId + \"' in the cache\");\n            }\n        }\n        return cachedDecision;\n    }\n\n    public void removeDeployment(String deploymentId) {\n\n        DmnDeploymentEntity deployment = deploymentEntityManager.findById(deploymentId);\n        if (deployment == null) {\n            throw new FlowableObjectNotFoundException(\"Could not find a deployment with id '\" + deploymentId + \"'.\");\n        }\n\n        // Remove any dmn definition from the cache\n        List<DmnDecision> definitions = new DecisionQueryImpl().deploymentId(deploymentId).list();\n\n        // Delete data\n        deploymentEntityManager.deleteDeployment(deploymentId);\n","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/persistence/deploy/DeploymentManager.java#L138-L174","documentation":"resolveDecision re-deploys the owning deployment so the decision lands in the decision cache; if after re-deployment getDecisionCacheEntry(decisionId) is still null, it throws FlowableException(\"deployment ... didn't put decision ... in the cache\"). This is an internal invariant violation: the deployment exists but doesn't contain the referenced decision.","triggerScenarios":"Reached from any findDeployed* lookup when a cached miss triggers re-resolution and the re-deployed deployment has no cache entry for the given decisionId — i.e. the deployment metadata references a decision it doesn't actually contain.","commonSituations":"Corrupted or partially-deleted deployment data (decision row deleted while deployment remains); manual database edits to ACT_DMN_ tables; upgrading Flowable across versions with stale cache/data.","solutions":["Redeploy the DMN resources cleanly: delete the broken deployment and deploy the .dmn files again.","Check data integrity between ACT_DMN_DEPLOYMENT and ACT_DMN_DECISION for the given deploymentId/decisionId.","Clear/invalidate the decision cache and restart the engine if stale cache entries are suspected."],"exampleFix":"// before\n// engine throws: deployment '12' didn't put decision '99' in the cache\n// after\ndmnRepositoryService.deleteDeployment(\"12\");\ndmnRepositoryService.createDeployment().addClasspathResource(\"approveOrder.dmn\").deploy();\nDecisionEntity d = manager.findDeployedDecisionById(validDecisionId);","handlingStrategy":"try-catch","validationCode":"boolean consistent = dmnRepositoryService.createDeploymentQuery().deploymentId(deploymentId).count() > 0\n    && dmnRepositoryService.createDecisionQuery().decisionId(decisionId).count() > 0;","typeGuard":null,"tryCatchPattern":"try { return manager.findDeployedDecisionById(decisionId); } catch (FlowableException e) { if (e.getMessage() != null && e.getMessage().contains(\"didn't put decision\")) { redeployBrokenDeployment(deploymentId); return manager.findDeployedDecisionById(decisionId); } throw e; }","preventionTips":["Never edit ACT_DMN_ tables manually","Delete and redeploy deployments as a unit instead of surgical DB fixes","Run data-integrity checks after upgrading Flowable versions"],"tags":["flowable-dmn","internal-invariant","cache","corrupt-deployment"],"backgroundTag":"internal-invariant-violation","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"}