{"record":{"id":"f517d5d75ac45df8","repo":"flowable/flowable-engine","slug":"assignee-is-null","errorCode":null,"errorMessage":"assignee is null","messagePattern":"assignee is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/runtime/PlanItemInstanceQueryImpl.java","lineNumber":729,"sourceCode":"    }\n\n    @Override\n    public PlanItemInstanceQuery planItemInstanceStartUserId(String startUserId) {\n        if (startUserId == null) {\n            throw new FlowableIllegalArgumentException(\"Start user id is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.startUserId = startUserId;\n        } else {\n            this.startUserId = startUserId;\n        }\n        return this;\n    }\n\n    @Override\n    public PlanItemInstanceQuery planItemInstanceAssignee(String assignee) {\n        if (assignee == null) {\n            throw new FlowableIllegalArgumentException(\"assignee is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.assignee = assignee;\n        } else {\n            this.assignee = assignee;\n        }\n        return this;\n    }\n\n    @Override\n    public PlanItemInstanceQuery planItemInstanceCompletedBy(String completedBy) {\n        if (completedBy == null) {\n            throw new FlowableIllegalArgumentException(\"completedBy is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.completedBy = completedBy;\n        } else {\n            this.completedBy = completedBy;","sourceCodeStart":711,"sourceCodeEnd":747,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/runtime/PlanItemInstanceQueryImpl.java#L711-L747","documentation":"PlanItemInstanceQueryImpl.planItemInstanceAssignee(String) throws FlowableIllegalArgumentException with message \"assignee is null\" when the assignee argument is null. Null is rejected because it cannot be translated into a SQL filter; callers should omit the criterion to mean 'no assignee filter'.","triggerScenarios":"Calling planItemInstanceAssignee(null), often when the assignee comes from a nullable task field, an unset variable, or an optional API parameter.","commonSituations":"Task list views that pass the currently selected assignee filter straight through; unclaimed tasks with no assignee whose value is propagated into a follow-up query; null returns from identity/user lookup services.","solutions":["Guard with a null check and only add the criterion when an assignee is actually present","If the intent is 'unassigned', use the dedicated no-assignee/without-assignee query option instead of null","Validate the incoming filter parameter at the API boundary before querying","Catch FlowableIllegalArgumentException as a last resort around query building"],"exampleFix":"// before\nquery.planItemInstanceAssignee(assignee); // throws when null\n// after\nif (assignee != null) {\n    query.planItemInstanceAssignee(assignee);\n}","handlingStrategy":"validation","validationCode":"if (assignee != null) {\n    query.planItemInstanceAssignee(assignee);\n}","typeGuard":"boolean hasAssignee = assignee != null;","tryCatchPattern":"try {\n    query.planItemInstanceAssignee(assignee);\n} catch (FlowableIllegalArgumentException e) {\n    log.warn(\"assignee was null, filter skipped\");\n}","preventionTips":["Treat unassigned/unknown assignee as 'omit the filter', not null","Validate assignee filter inputs before query construction","Use dedicated unassigned-query options instead of null semantics"],"tags":["flowable","cmmn","query","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-18T11:17:12.947Z"}