{"record":{"id":"e7f96a614eecc426","repo":"flowable/flowable-engine","slug":"process-definition-category-is-null","errorCode":null,"errorMessage":"Process definition category is null","messagePattern":"Process definition category is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/ExecutionQueryImpl.java","lineNumber":195,"sourceCode":"    }\n    \n    @Override\n    public ExecutionQueryImpl processDefinitionKeyLikeIgnoreCase(String processDefinitionKeyLikeIgnoreCase) {\n        if (processDefinitionKeyLikeIgnoreCase == null) {\n            throw new FlowableIllegalArgumentException(\"Process definition key is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.processDefinitionKeyLikeIgnoreCase = processDefinitionKeyLikeIgnoreCase;\n        } else {\n            this.processDefinitionKeyLikeIgnoreCase = processDefinitionKeyLikeIgnoreCase;\n        }\n        return this;\n    }\n\n    @Override\n    public ExecutionQuery processDefinitionCategory(String processDefinitionCategory) {\n        if (processDefinitionCategory == null) {\n            throw new FlowableIllegalArgumentException(\"Process definition category is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.processDefinitionCategory = processDefinitionCategory;\n        } else {\n            this.processDefinitionCategory = processDefinitionCategory;\n        }\n        return this;\n    }\n    \n    @Override\n    public ExecutionQuery processDefinitionCategoryLike(String processDefinitionCategoryLike) {\n        if (processDefinitionCategoryLike == null) {\n            throw new FlowableIllegalArgumentException(\"Process definition category is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.processDefinitionCategoryLike = processDefinitionCategoryLike;\n        } else {\n            this.processDefinitionCategoryLike = processDefinitionCategoryLike;","sourceCodeStart":177,"sourceCodeEnd":213,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/ExecutionQueryImpl.java#L177-L213","documentation":"FlowableIllegalArgumentException thrown by ExecutionQueryImpl.processDefinitionCategory when the category argument is null. Categories are optional filters, so Flowable requires you to omit the call rather than pass null. This fail-fast check keeps the persisted query state free of invalid values.","triggerScenarios":"Calling runtimeService.createExecutionQuery().processDefinitionCategory(null), or storing a null category into the query object in an or-statement branch.","commonSituations":"Category sourced from user input or configuration that is absent; model objects where category is an optional field mapped directly into the query.","solutions":["Only call processDefinitionCategory when the value is non-null.","Fix the source of the null: default the category in config or the requesting layer.","Use processDefinitionCategoryLike if you need pattern matching.","Remove the category filter to query all definitions."],"exampleFix":"// before\nquery.processDefinitionCategory(filter.getCategory());\n\n// after\nif (filter.getCategory() != null) {\n    query.processDefinitionCategory(filter.getCategory());\n}","handlingStrategy":"validation","validationCode":"if (category != null) { query.processDefinitionCategory(category); }","typeGuard":"boolean hasCategory = category != null;","tryCatchPattern":"try {\n    query.processDefinitionCategory(category);\n} catch (FlowableIllegalArgumentException e) {\n    log.warn(\"Null category filter skipped\");\n}","preventionTips":["Omit optional filters instead of passing null.","Default category values in configuration objects.","Validate request parameters before mapping them into queries."],"tags":["flowable","query","null-argument","process-definition"],"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"}