{"record":{"id":"615eddd36b5d76ef","repo":"flowable/flowable-engine","slug":"description-is-null-615edd","errorCode":null,"errorMessage":"Description is null","messagePattern":"Description is null","errorType":"validation","errorClass":"ActivitiIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/TaskQueryImpl.java","lineNumber":260,"sourceCode":"\n    @Override\n    public TaskQuery taskNameLikeIgnoreCase(String nameLikeIgnoreCase) {\n        if (nameLikeIgnoreCase == null) {\n            throw new ActivitiIllegalArgumentException(\"Task nameLikeIgnoreCase is null\");\n        }\n\n        if (orActive) {\n            currentOrQueryObject.nameLikeIgnoreCase = nameLikeIgnoreCase.toLowerCase();\n        } else {\n            this.nameLikeIgnoreCase = nameLikeIgnoreCase.toLowerCase();\n        }\n        return this;\n    }\n\n    @Override\n    public TaskQueryImpl taskDescription(String description) {\n        if (description == null) {\n            throw new ActivitiIllegalArgumentException(\"Description is null\");\n        }\n\n        if (orActive) {\n            currentOrQueryObject.description = description;\n        } else {\n            this.description = description;\n        }\n        return this;\n    }\n\n    @Override\n    public TaskQuery taskDescriptionLike(String descriptionLike) {\n        if (descriptionLike == null) {\n            throw new ActivitiIllegalArgumentException(\"Task descriptionlike is null\");\n        }\n        if (orActive) {\n            currentOrQueryObject.descriptionLike = descriptionLike;\n        } else {","sourceCodeStart":242,"sourceCodeEnd":278,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/TaskQueryImpl.java#L242-L278","documentation":"TaskQuery.taskDescription(String) requires a non-null exact description value. A null would not define a usable equality filter, so the engine throws ActivitiIllegalArgumentException during query construction.","triggerScenarios":"Calling taskDescription(null), commonly when the description comes from a task variable, DTO field, or request parameter that was absent.","commonSituations":"Filtering tasks by a description copied from another entity that may lack one; deserialized JSON missing the description key; DB joins producing null descriptions.","solutions":["Skip the filter when description is null: guard with an if-check before calling","Use taskDescriptionLike with a non-null pattern if partial matching is intended (still guard for null)","Validate at the API layer that a description filter is only sent when present"],"exampleFix":"// before\nquery.taskDescription(task.getDescription()); // may be null\n// after\nif (task.getDescription() != null) {\n    query.taskDescription(task.getDescription());\n}","handlingStrategy":"type-guard","validationCode":"if (description == null) { /* omit exact-description filter */ }","typeGuard":"void addDescriptionFilter(TaskQuery query, String description) {\n    if (description != null) {\n        query.taskDescription(description);\n    }\n}","tryCatchPattern":"try {\n    query.taskDescription(description);\n} catch (org.activiti.engine.ActivitiIllegalArgumentException e) {\n    // description was null; rebuild without the filter\n}","preventionTips":["Never pass entity fields that may be null directly into exact-match criteria","Validate request DTOs so optional filters are absent rather than null","Add integration tests for queries built from sparse data"],"tags":["activiti","task-query","null-argument","validation"],"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"}