flowable/flowable-engine · error · FlowableIllegalArgumentException
Provided groupId is null
Error message
Provided groupId is null
What it means
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().
Source
Thrown at modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/UserQueryImpl.java:213
throw new FlowableIllegalArgumentException("Provided email is null");
}
this.email = email;
return this;
}
@Override
public UserQuery userEmailLike(String emailLike) {
if (emailLike == null) {
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");View on GitHub (pinned to d6d39ce1c6)
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.
Example fix
// before
UserQuery q = identityService.createUserQuery().memberOfGroup(task.getGroupId());
// after
UserQuery q = identityService.createUserQuery();
if (task.getGroupId() != null) {
q = q.memberOfGroup(task.getGroupId());
} Defensive patterns
Strategy: validation
Validate before calling
if (groupId != null) { query = query.memberOfGroup(groupId); } Type guard
boolean hasGroupId(String id) { return id != null && !id.isBlank(); } Try / catch
try { query.memberOfGroup(groupId); } catch (FlowableIllegalArgumentException e) { log.warn("Null groupId filter ignored", e); } Prevention
- 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
When it happens
Trigger: Calling identityService.createUserQuery().memberOfGroup(null).
Common situations: A group variable resolved from configuration, a tenant lookup, or an assignment rule comes back null and is forwarded directly into the query.
Related errors
- Provided groupIds 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/7822b8f4369efeeb.
Report an issue: GitHub.