{"record":{"id":"a36e64bb94e3fb5a","repo":"flowable/flowable-engine","slug":"involved-groups-are-null-a36e64","errorCode":null,"errorMessage":"Involved groups are null","messagePattern":"Involved groups are null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/HistoricTaskInstanceQueryImpl.java","lineNumber":1958,"sourceCode":"\n    @Override\n    public HistoricTaskInstanceQuery taskInvolvedUser(String involvedUser) {\n        if (involvedUser == null) {\n            throw new FlowableIllegalArgumentException(\"involved user is null\");\n        }\n\n        if (inOrStatement) {\n            this.currentOrQueryObject.involvedUser = involvedUser;\n        } else {\n            this.involvedUser = involvedUser;\n        }\n        return this;\n    }\n\n    @Override\n    public HistoricTaskInstanceQuery taskInvolvedGroups(Collection<String> involvedGroups) {\n        if (involvedGroups == null) {\n            throw new FlowableIllegalArgumentException(\"Involved groups are null\");\n        }\n        if (involvedGroups.isEmpty()) {\n            throw new FlowableIllegalArgumentException(\"Involved groups are empty\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.involvedGroups = involvedGroups;\n        } else {\n            this.involvedGroups = involvedGroups;\n        }\n        return this;\n    }\n\n    @Override\n    public HistoricTaskInstanceQuery ignoreAssigneeValue() {\n        if (inOrStatement) {\n            this.currentOrQueryObject.ignoreAssigneeValue = true;\n        } else {\n            this.ignoreAssigneeValue = true;","sourceCodeStart":1940,"sourceCodeEnd":1976,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/HistoricTaskInstanceQueryImpl.java#L1940-L1976","documentation":"taskInvolvedGroups(Collection<String>) throws FlowableIllegalArgumentException when the involvedGroups collection is null. Flowable requires a concrete collection of group ids for this filter and rejects null immediately. A null list would otherwise produce invalid SQL for the identity-link join.","triggerScenarios":"Calling taskInvolvedGroups(null) — e.g. a group-membership provider returning null, an uninitialized field, or a missing payload field passed through.","commonSituations":"Group lookup services that signal 'no groups' as null instead of an empty list; queries built from optional configuration that was not set.","solutions":["Pass a non-null, non-empty collection of group ids; default to Collections.emptyList() and skip the call when empty.","Null-check provider results before forwarding them to the query.","If group filtering is optional, only call taskInvolvedGroups() when a list is actually available."],"exampleFix":"// before\nquery.taskInvolvedGroups(getUserGroups(userId));\n\n// after\nList<String> groups = getUserGroups(userId);\nif (groups != null && !groups.isEmpty()) {\n    query.taskInvolvedGroups(groups);\n}","handlingStrategy":"validation","validationCode":"if (involvedGroups != null && !involvedGroups.isEmpty()) {\n    historicTaskInstanceQuery.taskInvolvedGroups(involvedGroups);\n}","typeGuard":"boolean isNonEmptyGroups(Collection<String> groups) {\n    return groups != null && !groups.isEmpty();\n}","tryCatchPattern":"try {\n    query.taskInvolvedGroups(groups);\n} catch (FlowableIllegalArgumentException e) {\n    log.warn(\"Invalid involvedGroups filter: {}\", e.getMessage());\n}","preventionTips":["Make group providers return an empty list instead of null.","Null-check and empty-check group collections before every taskInvolvedGroups() call.","Skip the filter when the caller supplies no groups."],"tags":["flowable","query-validation","null-argument","task-query"],"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"}