flowable/flowable-engine · error · FlowableIllegalArgumentException
Involved groups are empty
Error message
Involved groups are empty
What it means
taskInvolvedGroups(Collection<String>) throws this error when the collection is non-null but empty. An empty collection cannot be turned into a meaningful IN-clause over identity links, so Flowable rejects it at query-build time.
Solutions
- Guard with !involvedGroups.isEmpty() and omit the filter when the list is empty.
- Decide the semantics of 'no groups': return an empty result immediately, or drop the group criterion entirely.
- Before splitting a comma-separated string, trim and check for blank input.
Example fix
// before
query.taskInvolvedGroups(groups); // throws when groups is empty
// after
if (groups != null && !groups.isEmpty()) {
query.taskInvolvedGroups(groups);
} Defensive patterns
Strategy: validation
Validate before calling
if (involvedGroups != null && !involvedGroups.isEmpty()) {
historicTaskInstanceQuery.taskInvolvedGroups(involvedGroups);
} else {
// no groups: either return empty result or omit this criterion
} Type guard
boolean hasGroups(Collection<String> groups) {
return groups != null && !groups.isEmpty();
} Try / catch
try {
query.taskInvolvedGroups(groups);
} catch (FlowableIllegalArgumentException e) {
// empty list: short-circuit or drop the filter
return Collections.emptyList();
} Prevention
- Treat empty group lists as 'no filter' explicitly and document that choice.
- Check membership results before building the query.
- Guard string splitting of group parameters for blank/empty input.
When it happens
Trigger: Calling taskInvolvedGroups(Collections.emptyList()) or a list reduced to zero elements by filtering (e.g. user is in no groups, or all groups were filtered out).
Common situations: Users with no group memberships; group lists filtered by tenant/type that end up empty; splitting an empty or blank string into a list.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- Candidate group list is empty
- Candidate group is null
- Candidate group list is empty
- Candidate group list is null
- Candidate user is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/077111a74c442cf8.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/HistoricTaskInstanceQueryImpl.java:1961
if (involvedUser == null) {
throw new FlowableIllegalArgumentException("involved user is null");
}
if (inOrStatement) {
this.currentOrQueryObject.involvedUser = involvedUser;
} else {
this.involvedUser = involvedUser;
}
return this;
}
@Override
public HistoricTaskInstanceQuery taskInvolvedGroups(Collection<String> involvedGroups) {
if (involvedGroups == null) {
throw new FlowableIllegalArgumentException("Involved groups are null");
}
if (involvedGroups.isEmpty()) {
throw new FlowableIllegalArgumentException("Involved groups are empty");
}
if (inOrStatement) {
this.currentOrQueryObject.involvedGroups = involvedGroups;
} else {
this.involvedGroups = involvedGroups;
}
return this;
}
@Override
public HistoricTaskInstanceQuery ignoreAssigneeValue() {
if (inOrStatement) {
this.currentOrQueryObject.ignoreAssigneeValue = true;
} else {
this.ignoreAssigneeValue = true;
}
return this;
}View on GitHub (pinned to d6d39ce1c6)