flowable/flowable-engine · error · FlowableIllegalArgumentException
Task assignee list is empty
Error message
Task assignee list is empty
What it means
taskAssigneeIds(Collection<String>) rejects an empty collection with this message. Flowable treats an empty assignee list as a query-usage mistake rather than an innocuous no-op filter, since it almost always indicates uninitialized input and would silently match nothing. Callers must pass at least one assignee ID.
Solutions
- Only call taskAssigneeIds when the collection is non-empty; omit the filter otherwise.
- If all tasks should match, construct the query without an assignee constraint.
- Populate the list with the intended assignee IDs before querying.
Example fix
// before
List<String> ids = getSelectedAssignees();
taskQuery.taskAssigneeIds(ids);
// after
List<String> ids = getSelectedAssignees();
if (ids != null && !ids.isEmpty()) {
taskQuery.taskAssigneeIds(ids);
} Defensive patterns
Strategy: validation
Validate before calling
if (assigneeIds == null || assigneeIds.isEmpty()) { return null; /* skip filter */ }
taskQuery.taskAssigneeIds(assigneeIds); Type guard
boolean usable = assigneeIds != null && !assigneeIds.isEmpty();
Try / catch
try {
taskQuery.taskAssigneeIds(assigneeIds);
} catch (FlowableIllegalArgumentException e) {
if (!"Task assignee list is empty".equals(e.getMessage())) throw e;
// fall back to query without assignee filter
} Prevention
- Treat empty filter selections as 'no filter' rather than passing them on.
- Centralize a guard helper that applies collection filters only when non-empty.
- Decide explicitly whether empty means 'match all' or 'error' in your domain and code it.
When it happens
Trigger: Calling taskQuery.taskAssigneeIds(new ArrayList<>()) or taskAssigneeIds(Collections.emptyList()) — e.g. when a filter UI produced no selections or a group lookup returned no members.
Common situations: Building a query from user-selected filters where nothing was selected; a lookup of team members returning an empty set; passing a default-initialized empty list instead of omitting the filter.
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
- Involved groups are empty
- Process category list is empty
- Process instance id list is empty
- Task category list is empty
- at least one of userId or groups must be provided
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/25f4cfcbba9bd3da.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/TaskQueryImpl.java:472
public TaskQuery taskAssigneeLikeIgnoreCase(String assigneeLikeIgnoreCase) {
if (assigneeLikeIgnoreCase == null) {
throw new FlowableIllegalArgumentException("assigneeLikeIgnoreCase is null");
}
if (orActive) {
currentOrQueryObject.assigneeLikeIgnoreCase = assigneeLikeIgnoreCase.toLowerCase();
} else {
this.assigneeLikeIgnoreCase = assigneeLikeIgnoreCase.toLowerCase();
}
return this;
}
@Override
public TaskQuery taskAssigneeIds(Collection<String> assigneeIds) {
if (assigneeIds == null) {
throw new FlowableIllegalArgumentException("Task assignee list is null");
}
if (assigneeIds.isEmpty()) {
throw new FlowableIllegalArgumentException("Task assignee list is empty");
}
for (String assignee : assigneeIds) {
if (assignee == null) {
throw new FlowableIllegalArgumentException("None of the given task assignees can be null");
}
}
if (assignee != null) {
throw new FlowableIllegalArgumentException("Invalid query usage: cannot set both taskAssigneeIds and taskAssignee");
}
if (assigneeLike != null) {
throw new FlowableIllegalArgumentException("Invalid query usage: cannot set both taskAssigneeIds and taskAssigneeLike");
}
if (assigneeLikeIgnoreCase != null) {
throw new FlowableIllegalArgumentException("Invalid query usage: cannot set both taskAssigneeIds and taskAssigneeLikeIgnoreCase");
}
if (orActive) {View on GitHub (pinned to d6d39ce1c6)