{"record":{"id":"bea41dd9c7ce37d4","repo":"flowable/flowable-engine","slug":"invalid-decision-id-null","errorCode":null,"errorMessage":"Invalid decision id : null","messagePattern":"Invalid decision id : null","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":64,"sourceCode":"\n    public DeploymentManager(DeploymentCache<DecisionCacheEntry> decisionCache, DmnEngineConfiguration engineConfig) {\n        this.decisionCache = decisionCache;\n        this.engineConfig = engineConfig;\n    }\n\n    public void deploy(DmnDeploymentEntity deployment) {\n        deploy(deployment, null);\n    }\n\n    public void deploy(DmnDeploymentEntity deployment, Map<String, Object> deploymentSettings) {\n        for (Deployer deployer : deployers) {\n            deployer.deploy(deployment, deploymentSettings);\n        }\n    }\n\n    public DecisionEntity findDeployedDecisionById(String decisionId) {\n        if (decisionId == null) {\n            throw new FlowableException(\"Invalid decision id : null\");\n        }\n\n        // first try the cache\n        DecisionCacheEntry cacheEntry = decisionCache.get(decisionId);\n        DecisionEntity decision = cacheEntry != null ? cacheEntry.getDecisionEntity() : null;\n\n        if (decision == null) {\n            decision = engineConfig.getDecisionEntityManager().findById(decisionId);\n            if (decision == null) {\n                throw new FlowableObjectNotFoundException(\"no decision found with id '\" + decisionId + \"'\");\n            }\n            decision = resolveDecision(decision).getDecisionEntity();\n        }\n        return decision;\n    }\n\n    public DecisionEntity findDeployedLatestDefinitionByKey(String definitionKey) {\n        DecisionEntity definition = decisionEntityManager.findLatestDecisionByKey(definitionKey);","sourceCodeStart":46,"sourceCodeEnd":82,"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#L46-L82","documentation":"DeploymentManager.findDeployedDecisionById rejects a null decisionId up front with FlowableException('Invalid decision id : null'). The manager needs a non-null key to consult the decision cache or the entity manager, so a null argument is treated as a programming error rather than a lookup miss.","triggerScenarios":"Passing a null decisionId to findDeployedDecisionById, typically from decisionTableEntity resolution when the calling entity's decision reference was never set.","commonSituations":"A DecisionTableEntity loaded from the database with a null/missing decision reference; calling runtime APIs with a variable that was never populated; deserialized entities missing the id.","solutions":["Check the decision id for null before calling and treat null as invalid input in your code.","Inspect the source entity (decisionTableEntity caller) — its decision reference is likely not persisted; fix the deployment/data.","If the id comes from a variable or request, validate/require it at the boundary."],"exampleFix":"// before\nDecisionEntity d = deploymentManager.findDeployedDecisionById(table.getDecisionRef());\n// after\nif (table.getDecisionRef() == null) {\n    throw new FlowableIllegalArgumentException(\"decision table has no decision reference\");\n}\nDecisionEntity d = deploymentManager.findDeployedDecisionById(table.getDecisionRef());","handlingStrategy":"type-guard","validationCode":"if (decisionId == null || decisionId.trim().isEmpty()) { throw new IllegalArgumentException(\"decisionId required\"); }","typeGuard":"boolean hasDecisionId(DecisionTableEntity t) { return t != null && t.getDecisionRef() != null; }","tryCatchPattern":"try { return manager.findDeployedDecisionById(id); } catch (FlowableException e) { if (e.getMessage().contains(\"Invalid decision id : null\")) { throw new IllegalArgumentException(\"decision reference missing\"); } throw e; }","preventionTips":["Null-check ids at API boundaries before calling DeploymentManager","Ensure decision-table references are persisted correctly in your data","Validate entities loaded from storage before resolving decisions"],"tags":["flowable-dmn","null-check","decision-lookup"],"backgroundTag":"null-argument","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"}