flowable/flowable-engine · error · FlowableIllegalArgumentException
groupId is null
Error message
groupId is null
What it means
HistoricCaseInstanceQueryImpl.involvedGroup(String groupId, String identityLinkType) throws FlowableIllegalArgumentException("groupId is null") when the groupId parameter is null. Group-based involvement filters require an actual group id combined with a link type to build the identity-link predicate.
Source
Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/history/HistoricCaseInstanceQueryImpl.java:1111
public HistoricCaseInstanceQuery involvedUser(String userId, String identityLinkType) {
if (userId == null) {
throw new FlowableIllegalArgumentException("userId is null");
}
if (identityLinkType == null) {
throw new FlowableIllegalArgumentException("identityLinkType is null");
}
if (inOrStatement) {
this.currentOrQueryObject.involvedUserIdentityLink = new IdentityLinkQueryObject(userId, null, identityLinkType);
} else {
this.involvedUserIdentityLink = new IdentityLinkQueryObject(userId, null, identityLinkType);
}
return this;
}
@Override
public HistoricCaseInstanceQuery involvedGroup(String groupId, String identityLinkType) {
if (groupId == null) {
throw new FlowableIllegalArgumentException("groupId is null");
}
if (identityLinkType == null) {
throw new FlowableIllegalArgumentException("identityLinkType is null");
}
if (inOrStatement) {
this.currentOrQueryObject.involvedGroupIdentityLink = new IdentityLinkQueryObject(null, groupId, identityLinkType);
} else {
this.involvedGroupIdentityLink = new IdentityLinkQueryObject(null, groupId, identityLinkType);
}
return this;
}
@Override
public HistoricCaseInstanceQuery involvedGroups(Set<String> groupIds) {
if (groupIds == null) {
throw new FlowableIllegalArgumentException("groupIds are null");
}
if (groupIds.isEmpty()) {View on GitHub (pinned to d6d39ce1c6)
Solutions
- Check groupId for null before calling involvedGroup.
- Handle the no-group case explicitly (skip the filter or use a user-based filter instead).
- Remember the same method also throws "identityLinkType is null" — validate both parameters.
- Ensure group-resolution helpers never return null; return an empty collection and branch on it.
Example fix
// before
query.involvedGroup(groupId, IdentityLinkType.PARTICIPANT); // groupId may be null
// after
if (groupId != null) {
query.involvedGroup(groupId, IdentityLinkType.PARTICIPANT);
} Defensive patterns
Strategy: validation
Validate before calling
if (groupId == null || groupId.isEmpty()) {
throw new IllegalArgumentException("groupId is required");
}
if (identityLinkType == null) {
throw new IllegalArgumentException("identityLinkType is required");
}
query.involvedGroup(groupId, identityLinkType); Type guard
boolean canFilterByGroupLink(String groupId, String type) {
return groupId != null && type != null;
} Try / catch
try {
query.involvedGroup(groupId, identityLinkType);
} catch (FlowableIllegalArgumentException e) {
if (e.getMessage() != null && e.getMessage().contains("is null")) {
// skip group filter or rethrow with context
} else {
throw e;
}
} Prevention
- Check group membership results before filtering; empty memberships mean no group id
- Validate both groupId and identityLinkType before the call
- Handle users with no groups with an explicit alternate query path
- Source group ids from a resolver that surfaces empty results, not null
When it happens
Trigger: Calling involvedGroup(null, identityLinkType) on a HistoricCaseInstanceQuery before executing the query.
Common situations: Group id resolved from user memberships was empty (user in no group) and surfaced as null; tenant/group config missing; refactoring where the group id variable was dropped.
Related errors
- involvedUser is null
- userId is null
- identityLinkType is null
- groupIds are null
- variableNames is null or empty
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/3692e02798786dca.
Report an issue: GitHub.