{"record":{"id":"d5419e8942e0bcc4","repo":"flowable/flowable-engine","slug":"case-definition-category-is-null-d5419e","errorCode":null,"errorMessage":"Case definition category is null","messagePattern":"Case definition category is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/runtime/CaseInstanceQueryImpl.java","lineNumber":209,"sourceCode":"    }\n    \n    @Override\n    public CaseInstanceQueryImpl caseDefinitionKeyLikeIgnoreCase(String caseDefinitionKeyLikeIgnoreCase) {\n        if (caseDefinitionKeyLikeIgnoreCase == null) {\n            throw new FlowableIllegalArgumentException(\"Case definition key is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.caseDefinitionKeyLikeIgnoreCase = caseDefinitionKeyLikeIgnoreCase;\n        } else {\n            this.caseDefinitionKeyLikeIgnoreCase = caseDefinitionKeyLikeIgnoreCase;\n        }\n        return this;\n    }\n\n    @Override\n    public CaseInstanceQueryImpl caseDefinitionCategory(String caseDefinitionCategory) {\n        if (caseDefinitionCategory == null) {\n            throw new FlowableIllegalArgumentException(\"Case definition category is null\");\n        }\n\n        if (inOrStatement) {\n            this.currentOrQueryObject.caseDefinitionCategory = caseDefinitionCategory;\n        } else {\n            this.caseDefinitionCategory = caseDefinitionCategory;\n        }\n        return this;\n    }\n    \n    @Override\n    public CaseInstanceQueryImpl caseDefinitionCategoryLike(String caseDefinitionCategoryLike) {\n        if (caseDefinitionCategoryLike == null) {\n            throw new FlowableIllegalArgumentException(\"Case definition category is null\");\n        }\n\n        if (inOrStatement) {\n            this.currentOrQueryObject.caseDefinitionCategoryLike = caseDefinitionCategoryLike;","sourceCodeStart":191,"sourceCodeEnd":227,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/runtime/CaseInstanceQueryImpl.java#L191-L227","documentation":"CaseInstanceQueryImpl.caseDefinitionCategory filters by the category declared on the case definition and throws FlowableIllegalArgumentException when the argument is null. As with the other query filters, omitting the filter is done by not calling the method, never by passing null.","triggerScenarios":"createCaseInstanceQuery().caseDefinitionCategory(null), typically from an optional category request parameter.","commonSituations":"Category facets in search UIs where the user cleared the selection; category metadata missing from deployment descriptors so the lookup yields null.","solutions":["Pass the actual category string, e.g. \"http://flowable.org/cmmn\".","Only call caseDefinitionCategory when the value is non-null.","Validate/trim category inputs at the service boundary."],"exampleFix":"// before\nquery.caseDefinitionCategory(filter.getCategory()).list();\n// after\nif (filter.getCategory() != null) {\n    query = query.caseDefinitionCategory(filter.getCategory());\n}\nquery.list();","handlingStrategy":"validation","validationCode":"if (category != null) {\n    query = query.caseDefinitionCategory(category);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only apply category filters when the category is known non-null.","Ensure deployments set the category attribute if you plan to filter on it.","Trim and validate category values at the API boundary."],"tags":["null-argument","query","cmmn","illegal-argument"],"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"}