{"record":{"id":"7822b8f4369efeeb","repo":"flowable/flowable-engine","slug":"provided-groupid-is-null","errorCode":null,"errorMessage":"Provided groupId is null","messagePattern":"Provided groupId is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/UserQueryImpl.java","lineNumber":213,"sourceCode":"            throw new FlowableIllegalArgumentException(\"Provided email is null\");\n        }\n        this.email = email;\n        return this;\n    }\n\n    @Override\n    public UserQuery userEmailLike(String emailLike) {\n        if (emailLike == null) {\n            throw new FlowableIllegalArgumentException(\"Provided emailLike is null\");\n        }\n        this.emailLike = emailLike;\n        return this;\n    }\n\n    @Override\n    public UserQuery memberOfGroup(String groupId) {\n        if (groupId == null) {\n            throw new FlowableIllegalArgumentException(\"Provided groupId is null\");\n        }\n        this.groupId = groupId;\n        return this;\n    }\n\n    @Override\n    public UserQuery memberOfGroups(List<String> groupIds) {\n        if (groupIds == null) {\n            throw new FlowableIllegalArgumentException(\"Provided groupIds is null\");\n        }\n        this.groupIds = groupIds;\n        return this;\n    }\n\n    @Override\n    public UserQuery tenantId(String tenantId) {\n        if (tenantId == null) {\n            throw new FlowableIllegalArgumentException(\"TenantId is null\");","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/UserQueryImpl.java#L195-L231","documentation":"UserQueryImpl.memberOfGroup(String) throws FlowableIllegalArgumentException when the groupId argument is null. The engine requires an explicit group id to filter users by membership. Pass a real group id or don't call memberOfGroup().","triggerScenarios":"Calling identityService.createUserQuery().memberOfGroup(null).","commonSituations":"A group variable resolved from configuration, a tenant lookup, or an assignment rule comes back null and is forwarded directly into the query.","solutions":["Pass a valid, existing group id string.","Guard: only call memberOfGroup() when groupId != null.","If multiple groups are possible, use memberOfGroups(List<String>) with a non-null list instead."],"exampleFix":"// before\nUserQuery q = identityService.createUserQuery().memberOfGroup(task.getGroupId());\n// after\nUserQuery q = identityService.createUserQuery();\nif (task.getGroupId() != null) {\n    q = q.memberOfGroup(task.getGroupId());\n}","handlingStrategy":"validation","validationCode":"if (groupId != null) { query = query.memberOfGroup(groupId); }","typeGuard":"boolean hasGroupId(String id) { return id != null && !id.isBlank(); }","tryCatchPattern":"try { query.memberOfGroup(groupId); } catch (FlowableIllegalArgumentException e) { log.warn(\"Null groupId filter ignored\", e); }","preventionTips":["Resolve group ids from a reliable source and check for null before use","Skip membership filtering when no group is assigned","Log which caller passed a null group id to catch bad resolution logic early"],"tags":["flowable","idm","null-argument","query","group"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}