{"record":{"id":"3ed94048e40fc3f2","repo":"flowable/flowable-engine","slug":"id-is-null-3ed940","errorCode":null,"errorMessage":"id is null","messagePattern":"id is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"warning","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/DecisionQueryImpl.java","lineNumber":133,"sourceCode":"            throw new FlowableIllegalArgumentException(\"name is null\");\n        }\n        this.name = name;\n        return this;\n    }\n\n    @Override\n    public DecisionQueryImpl decisionNameLike(String nameLike) {\n        if (nameLike == null) {\n            throw new FlowableIllegalArgumentException(\"nameLike is null\");\n        }\n        this.nameLike = nameLike;\n        return this;\n    }\n\n    @Override\n    public DecisionQueryImpl deploymentId(String deploymentId) {\n        if (deploymentId == null) {\n            throw new FlowableIllegalArgumentException(\"id is null\");\n        }\n        this.deploymentId = deploymentId;\n        return this;\n    }\n\n    @Override\n    public DecisionQueryImpl deploymentIds(Set<String> deploymentIds) {\n        if (deploymentIds == null) {\n            throw new FlowableIllegalArgumentException(\"ids are null\");\n        }\n        this.deploymentIds = deploymentIds;\n        return this;\n    }\n\n    @Override\n    public DecisionQueryImpl parentDeploymentId(String parentDeploymentId) {\n        if (parentDeploymentId == null) {\n            throw new FlowableIllegalArgumentException(\"parentDeploymentId is null\");","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/DecisionQueryImpl.java#L115-L151","documentation":"DecisionQueryImpl.deploymentId validates its argument but the error message says \"id is null\" — a misleading message, since the parameter is the deployment ID. Passing null throws FlowableIllegalArgumentException at query construction.","triggerScenarios":"Calling decisionRepositoryService.createDecisionQuery().deploymentId(null), often because the deployment ID variable was never populated from a prior lookup.","commonSituations":"Deployment ID obtained from a failed/missed repository lookup returning null; request path variable absent.","solutions":["Ensure the deployment ID is resolved before querying (check the prior repositoryService lookup for null).","Guard the call: only filter by deploymentId when non-null.","Note the error message says \"id is null\" — do not misread it as a decision-id problem; the deploymentId argument is the culprit."],"exampleFix":"// before\nString deploymentId = deployment.getId(); // null when lookup failed\nquery.deploymentId(deploymentId);\n\n// after\nif (deployment != null && deployment.getId() != null) {\n    query.deploymentId(deployment.getId());\n}","handlingStrategy":"validation","validationCode":"if (deploymentId != null && !deploymentId.isBlank()) { query.deploymentId(deploymentId); }","typeGuard":"boolean hasDeploymentId = (deploymentId != null && !deploymentId.isEmpty());","tryCatchPattern":"try {\n    query.deploymentId(deploymentId);\n} catch (FlowableIllegalArgumentException e) {\n    throw new IllegalStateException(\"deploymentId was null; check upstream deployment lookup\", e);\n}","preventionTips":["Remember the message \"id is null\" actually refers to the deploymentId argument","Resolve and assert deployment IDs before querying","Fail early in your own service if a deployment lookup returns null"],"tags":["null-check","query","validation","java"],"backgroundTag":"null-argument","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"}