{"record":{"id":"f9ab7dd79d41b9d9","repo":"flowable/flowable-engine","slug":"ids-are-null-f9ab7d","errorCode":null,"errorMessage":"ids are null","messagePattern":"ids are null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CaseDefinitionQueryImpl.java","lineNumber":159,"sourceCode":"            throw new FlowableIllegalArgumentException(\"nameLikeIgnoreCase is null\");\n        }\n        this.nameLikeIgnoreCase = nameLikeIgnoreCase;\n        return this;\n    }\n\n    @Override\n    public CaseDefinitionQueryImpl 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 CaseDefinitionQueryImpl deploymentIds(Set<String> deploymentIds) {\n        if (deploymentIds == null) {\n            throw new FlowableIllegalArgumentException(\"ids are null\");\n        } else if (deploymentIds.isEmpty()) {\n            throw new FlowableIllegalArgumentException(\"ids is an empty collection\");\n        }\n        this.deploymentIds = deploymentIds;\n        return this;\n    }\n\n    @Override\n    public CaseDefinitionQuery parentDeploymentId(String parentDeploymentId) {\n        if (parentDeploymentId == null) {\n            throw new FlowableIllegalArgumentException(\"parentDeploymentId is null\");\n        }\n        this.parentDeploymentId = parentDeploymentId;\n        return this;\n    }\n\n    @Override\n    public CaseDefinitionQueryImpl caseDefinitionKey(String key) {","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CaseDefinitionQueryImpl.java#L141-L177","documentation":"FlowableIllegalArgumentException thrown by CaseDefinitionQueryImpl.deploymentIds(Set<String>) when the deployment id set is null. Batch filters must receive a populated collection; null cannot be distinguished from 'no filter', so the engine treats it as a programming error. An empty set is rejected separately (see next error).","triggerScenarios":"Calling caseDefinitionQuery.deploymentIds(null), typically when a list of deployment ids was never initialized or a lookup returned null.","commonSituations":"Multi-tenant or batch scripts assembling deployment id sets from configuration or previous queries; the collection variable stayed null when no matching deployments were found.","solutions":["Pass a non-null Set containing the deployment ids to filter on.","If no ids were found and you intend 'match nothing', return early or handle the empty result instead of calling deploymentIds.","Initialize the collection (e.g. new HashSet<>()) before the query-building code."],"exampleFix":"// before\nSet<String> ids = findDeploymentIds(); // may return null\nquery.deploymentIds(ids);\n\n// after\nSet<String> ids = findDeploymentIds();\nif (ids != null && !ids.isEmpty()) {\n    query.deploymentIds(ids);\n}","handlingStrategy":"validation","validationCode":"if (deploymentIds != null && !deploymentIds.isEmpty()) {\n    query.deploymentIds(deploymentIds);\n}","typeGuard":"boolean hasIds = deploymentIds != null && !deploymentIds.isEmpty();","tryCatchPattern":"try {\n    query.deploymentIds(deploymentIds);\n} catch (FlowableIllegalArgumentException e) {\n    // null or empty set — decide: skip filter or return empty result\n}","preventionTips":["Initialize id collections to an empty set rather than leaving them null.","Validate collections once when they are assembled, before query construction."],"tags":["flowable","cmmn","query","collection","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"}