{"record":{"id":"2937184114712e3d","repo":"flowable/flowable-engine","slug":"categorynotequals-is-null-293718","errorCode":null,"errorMessage":"categoryNotEquals is null","messagePattern":"categoryNotEquals is null","errorType":"validation","errorClass":"ActivitiIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/ProcessDefinitionQueryImpl.java","lineNumber":114,"sourceCode":"            throw new ActivitiIllegalArgumentException(\"category is null\");\n        }\n        this.category = category;\n        return this;\n    }\n\n    @Override\n    public ProcessDefinitionQueryImpl processDefinitionCategoryLike(String categoryLike) {\n        if (categoryLike == null) {\n            throw new ActivitiIllegalArgumentException(\"categoryLike is null\");\n        }\n        this.categoryLike = categoryLike;\n        return this;\n    }\n\n    @Override\n    public ProcessDefinitionQueryImpl processDefinitionCategoryNotEquals(String categoryNotEquals) {\n        if (categoryNotEquals == null) {\n            throw new ActivitiIllegalArgumentException(\"categoryNotEquals is null\");\n        }\n        this.categoryNotEquals = categoryNotEquals;\n        return this;\n    }\n\n    @Override\n    public ProcessDefinitionQueryImpl processDefinitionName(String name) {\n        if (name == null) {\n            throw new ActivitiIllegalArgumentException(\"name is null\");\n        }\n        this.name = name;\n        return this;\n    }\n\n    @Override\n    public ProcessDefinitionQueryImpl processDefinitionNameLike(String nameLike) {\n        if (nameLike == null) {\n            throw new ActivitiIllegalArgumentException(\"nameLike is null\");","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/ProcessDefinitionQueryImpl.java#L96-L132","documentation":"ProcessDefinitionQueryImpl.processDefinitionCategoryNotEquals(String) excludes process definitions whose category equals the given value. Flowable throws ActivitiIllegalArgumentException when the value is null, since 'not equals null' cannot be expressed as intended in the query filter.","triggerScenarios":"Calling processDefinitionQuery.processDefinitionCategoryNotEquals(null), often when an exclusion value is conditionally set.","commonSituations":"Building 'exclude category X' features where X comes from user input or config that is missing; copying filter maps with absent keys directly into the query.","solutions":["Pass a non-null category string to exclude.","Null-check the exclusion value; skip the filter when none is specified.","Use processDefinitionCategory() instead if you actually want to include one category.","Catch ActivitiIllegalArgumentException to report invalid query parameters."],"exampleFix":"// before\nquery.processDefinitionCategoryNotEquals(excludedCategory); // may be null\n// after\nif (excludedCategory != null) {\n    query.processDefinitionCategoryNotEquals(excludedCategory);\n}","handlingStrategy":"validation","validationCode":"if (categoryNotEquals != null && !categoryNotEquals.isEmpty()) {\n    query.processDefinitionCategoryNotEquals(categoryNotEquals);\n}","typeGuard":"boolean hasExclusion(String v) { return v != null && !v.isEmpty(); }","tryCatchPattern":"try {\n    query.processDefinitionCategoryNotEquals(excluded);\n} catch (org.activiti.engine.ActivitiIllegalArgumentException e) {\n    throw new BadRequestException(\"categoryNotEquals requires a non-null value\", e);\n}","preventionTips":["Only add exclusion filters when an explicit value is configured.","Distinguish 'no filter' from 'exclude nothing' explicitly in your filter model.","Validate exclusion values at the API boundary."],"tags":["activiti","flowable","process-definition","null-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-14T16:17:12.679Z"}