flowable/flowable-engine · error · FlowableIllegalArgumentException
Task assignee list is null
Error message
Task assignee list is null
What it means
TaskQueryImpl.taskAssigneeIds(Collection<String>) rejects a null collection before building the query. Flowable validates query inputs eagerly so invalid filters fail at query construction rather than producing an empty or broken SQL query. Throwing FlowableIllegalArgumentException here surfaces the programming mistake immediately at the call site.
Solutions
- Ensure the collection passed to taskAssigneeIds is non-null; initialize it to Collections.emptyList() or a real list at declaration.
- If the caller legitimately has no assignees, skip calling taskAssigneeIds instead of passing null.
- Guard with an early null check before building the query and choose an alternative filter path.
Example fix
// before
taskQuery.taskAssigneeIds(userService.getAssigneeIds(userId));
// after
List<String> assigneeIds = userService.getAssigneeIds(userId);
if (assigneeIds != null && !assigneeIds.isEmpty()) {
taskQuery.taskAssigneeIds(assigneeIds);
} Defensive patterns
Strategy: validation
Validate before calling
if (assigneeIds == null) { throw new IllegalArgumentException("assigneeIds required"); }
taskQuery.taskAssigneeIds(assigneeIds); Type guard
boolean usable = assigneeIds != null;
Try / catch
try {
taskQuery.taskAssigneeIds(assigneeIds);
} catch (FlowableIllegalArgumentException e) {
if (!"Task assignee list is null".equals(e.getMessage())) throw e;
logger.warn("No assignee IDs supplied; building unfiltered query", e);
} Prevention
- Initialize collections at declaration instead of leaving them null.
- Never let producer methods return null collections; return empty lists.
- Validate inputs at the boundary of your service layer before building Flowable queries.
When it happens
Trigger: Calling taskQuery.taskAssigneeIds(null) — typically when the assignee collection is a variable that was never initialized or a method returned null instead of an empty list.
Common situations: Assignee IDs fetched from an external service or config map returning null; a nullable method parameter forwarded straight into the query builder; refactoring from taskAssignee(String) to taskAssigneeIds(Collection) without null-checking the new argument.
Related errors
- Candidate user is null
- Description is null
- Involved groups are null
- Involved user is null
- Max Priority is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/57ac96a284af151e.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/TaskQueryImpl.java:469
}
@Override
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");View on GitHub (pinned to d6d39ce1c6)