{"record":{"id":"39b80d1fa78a553b","repo":"flowable/flowable-engine","slug":"key-is-null-39b80d","errorCode":null,"errorMessage":"key is null","messagePattern":"key is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/DmnDeploymentQueryImpl.java","lineNumber":148,"sourceCode":"            throw new FlowableIllegalArgumentException(\"parentDeploymentId is null\");\n        }\n        this.parentDeploymentId = parentDeploymentId;\n        return this;\n    }\n\n    @Override\n    public DmnDeploymentQueryImpl parentDeploymentIdLike(String parentDeploymentIdLike) {\n        if (parentDeploymentIdLike == null) {\n            throw new FlowableIllegalArgumentException(\"parentDeploymentIdLike is null\");\n        }\n        this.parentDeploymentIdLike = parentDeploymentIdLike;\n        return this;\n    }\n\n    @Override\n    public DmnDeploymentQueryImpl decisionKey(String key) {\n        if (key == null) {\n            throw new FlowableIllegalArgumentException(\"key is null\");\n        }\n        this.decisionKey = key;\n        return this;\n    }\n\n    @Override\n    public DmnDeploymentQueryImpl decisionKeyLike(String keyLike) {\n        if (keyLike == null) {\n            throw new FlowableIllegalArgumentException(\"keyLike is null\");\n        }\n        this.decisionKeyLike = keyLike;\n        return this;\n    }\n\n    // sorting ////////////////////////////////////////////////////////\n\n    @Override\n    public DmnDeploymentQuery orderByDeploymentId() {","sourceCodeStart":130,"sourceCodeEnd":166,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/DmnDeploymentQueryImpl.java#L130-L166","documentation":"DmnDeploymentQueryImpl.decisionKey(String) throws FlowableIllegalArgumentException when the key parameter is null. The decision key is a mandatory non-null criterion for filtering deployments by the key of decisions they contain; Flowable validates this at the builder call to avoid generating an invalid query.","triggerScenarios":"Calling dmnRepositoryService.createDeploymentQuery().decisionKey(null), typically when the key is looked up from configuration, a decision-table reference, or an upstream service response that returned null.","commonSituations":"Wiring a DMN decision key from application config that is missing; resolving a decision key from a model or BPMN expression that evaluated to null; renaming decision tables and using a stale lookup that no longer matches.","solutions":["Supply the actual decision key string used in the deployed DMN model","Only call decisionKey(...) when the key is known and non-null; otherwise omit the filter","Verify the source of the key (config, model, service) returns a value; add an explicit null check with a meaningful error"],"exampleFix":"// before\nquery.decisionKey(dmnModel.getDecisionKey()); // may be null\n// after\nString key = dmnModel.getDecisionKey();\nif (key != null) {\n    query.decisionKey(key);\n}","handlingStrategy":"validation","validationCode":"if (decisionKey == null || decisionKey.isEmpty()) { throw new IllegalArgumentException(\"decisionKey required for deployment query\"); }","typeGuard":"boolean hasDecisionKey(String key) { return key != null && !key.isBlank(); }","tryCatchPattern":"try { query.decisionKey(key); } catch (FlowableIllegalArgumentException e) { throw new IllegalStateException(\"Decision key missing in configuration\", e); }","preventionTips":["Source decision keys from the deployed DMN model rather than hand-maintained config","Fail fast at startup if required decision keys are missing from configuration"],"tags":["flowable","dmn","query","null-check"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}