flowable/flowable-engine · error · FlowableIllegalArgumentException
Provided groupIds is null
Error message
Provided groupIds is null
What it means
UserQueryImpl.memberOfGroups(List<String>) throws FlowableIllegalArgumentException when the groupIds list reference is null. The engine distinguishes 'no filter' from 'filter by a null list' and rejects the latter. Pass a populated (or at least non-null) list of group ids.
Source
Thrown at modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/UserQueryImpl.java:222
throw new FlowableIllegalArgumentException("Provided emailLike is null");
}
this.emailLike = emailLike;
return this;
}
@Override
public UserQuery memberOfGroup(String groupId) {
if (groupId == null) {
throw new FlowableIllegalArgumentException("Provided groupId is null");
}
this.groupId = groupId;
return this;
}
@Override
public UserQuery memberOfGroups(List<String> groupIds) {
if (groupIds == null) {
throw new FlowableIllegalArgumentException("Provided groupIds is null");
}
this.groupIds = groupIds;
return this;
}
@Override
public UserQuery tenantId(String tenantId) {
if (tenantId == null) {
throw new FlowableIllegalArgumentException("TenantId is null");
}
this.tenantId = tenantId;
return this;
}
// sorting //////////////////////////////////////////////////////////
@Override
public UserQuery orderByUserId() {View on GitHub (pinned to d6d39ce1c6)
Solutions
- Pass a non-null List<String> of group ids (an empty list is acceptable if supported; otherwise check size first).
- Guard: if (groupIds != null && !groupIds.isEmpty()) query = query.memberOfGroups(groupIds);
- Initialize the collection with Collections.emptyList() instead of leaving it null.
Example fix
// before
query.memberOfGroups(candidateGroups); // candidateGroups may be null
// after
if (candidateGroups != null && !candidateGroups.isEmpty()) {
query = query.memberOfGroups(candidateGroups);
} Defensive patterns
Strategy: validation
Validate before calling
if (groupIds != null && !groupIds.isEmpty()) { query = query.memberOfGroups(groupIds); } Type guard
boolean hasGroups(java.util.List<String> ids) { return ids != null && !ids.isEmpty(); } Try / catch
try { query.memberOfGroups(groupIds); } catch (FlowableIllegalArgumentException e) { log.warn("Null groupIds ignored", e); } Prevention
- Initialize collections to empty lists instead of null
- Distinguish 'no groups provided' (skip filter) from 'filter by these groups'
- Sanitize data read from process variables before use
When it happens
Trigger: Calling identityService.createUserQuery().memberOfGroups(null); typically when the list itself was never initialized.
Common situations: Collecting candidate groups from process variables or role mappings; the variable is unset so the List reference is null rather than empty.
Related errors
- Provided groupId is null
- Provided email is null
- Provided emailLike is null
- groupId is null
- groupId is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/d10e5a65742a4d21.
Report an issue: GitHub.