flowable/flowable-engine · error · FlowableIllegalArgumentException

Provided type is null

Error message

Provided type is null

What it means

Fluent-setter validation in GroupQueryImpl.groupType: a null group type filter was supplied; the builder rejects it rather than silently ignoring the constraint.

Solutions

  1. Null-check the type before calling groupType(); skip the filter when absent.
  2. Treat 'any type' as omission of the criterion rather than a null value.
  3. Validate the type against allowed values at the boundary.
  4. If using enum lookups, use a safe mapping with a default or throw a clearer domain error.

Example fix

// before
String type = filter.getType(); // may be null
query = identityService.createGroupQuery().groupType(type);
// after
GroupQuery query = identityService.createGroupQuery();
if (filter.getType() != null) {
    query = query.groupType(filter.getType());
}
Defensive patterns

Strategy: validation

Validate before calling

GroupQuery q = identityService.createGroupQuery();
if (type != null) {
    q = q.groupType(type);
}

Try / catch

try {
    q = q.groupType(type);
} catch (FlowableIllegalArgumentException e) {
    throw new BadRequestException("group type must not be null", e);
}

Prevention

When it happens

Trigger: Calling .groupType(null) — typically a nullable type field from configuration, a request parameter, or an enum lookup that returned null.

Common situations: Filtering by group type where the type filter is optional, mapping a UI dropdown's 'any' option to null instead of omitting the filter, enum valueOf on unknown strings.

Related errors


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

Appendix: source

Thrown at modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/GroupQueryImpl.java:103

            throw new FlowableIllegalArgumentException("Provided name is null");
        }
        this.nameLike = nameLike;
        return this;
    }

    @Override
    public GroupQuery groupNameLikeIgnoreCase(String nameLikeIgnoreCase) {
        if (nameLikeIgnoreCase == null) {
            throw new FlowableIllegalArgumentException("Provided name is null");
        }
        this.nameLikeIgnoreCase = nameLikeIgnoreCase.toLowerCase();
        return this;
    }

    @Override
    public GroupQuery groupType(String type) {
        if (type == null) {
            throw new FlowableIllegalArgumentException("Provided type is null");
        }
        this.type = type;
        return this;
    }

    @Override
    public GroupQuery groupMember(String userId) {
        if (userId == null) {
            throw new FlowableIllegalArgumentException("Provided userId is null");
        }
        this.userId = userId;
        return this;
    }

    @Override
    public GroupQuery groupMembers(List<String> userIds) {
        if (userIds == null) {
            throw new FlowableIllegalArgumentException("Provided userIds is null");

View on GitHub (pinned to d6d39ce1c6)