flowable/flowable-engine · error · FlowableIllegalArgumentException

groupId is null

Error message

groupId is null

What it means

CaseInstanceQueryImpl.involvedGroup(String groupId, String identityLinkType) throws FlowableIllegalArgumentException when groupId is null. Group-based case involvement filtering requires a concrete group id to join against the identity link table; null is rejected at query build time.

Source

Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/runtime/CaseInstanceQueryImpl.java:841

    public CaseInstanceQuery 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 CaseInstanceQuery 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 CaseInstanceQuery involvedGroups(Set<String> groupIds) {
        if (groupIds == null) {
            throw new FlowableIllegalArgumentException("involvedGroups are null");
        }
        if (groupIds.isEmpty()) {

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Validate groupId is non-null before calling involvedGroup and skip the filter when absent.
  2. Resolve the caller's group(s) from the identity/tenant layer before building the query.
  3. Use involvedGroups(Set<String>) with a populated set when multiple groups may apply.
  4. Fix the upstream group-resolution code that returned null.

Example fix

// before
query.involvedGroup(groupResolver.currentGroup(), "participant");
// after
String groupId = groupResolver.currentGroup();
if (groupId != null) {
    query.involvedGroup(groupId, "participant");
}
Defensive patterns

Strategy: validation

Validate before calling

if (groupId == null) {
    throw new IllegalArgumentException("groupId must not be null for involvedGroup");
}
query.involvedGroup(groupId, identityLinkType);

Type guard

boolean hasGroup(String groupId) {
    return groupId != null && !groupId.isBlank();
}

Try / catch

try {
    query.involvedGroup(groupId, type);
} catch (FlowableIllegalArgumentException e) {
    log.warn("Group filter skipped: {}", e.getMessage());
}

Prevention

When it happens

Trigger: Calling involvedGroup(null, "participant") or forwarding a null group id from a tenant/group resolver or request payload.

Common situations: Multi-tenant applications where the user's group membership was not resolved (no group claim in the token); search forms where the group filter was not filled in but applied anyway.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/e3143ceef32c4a9e. Report an issue: GitHub.