flowable/flowable-engine · error · FlowableIllegalArgumentException
Invalid query usage: cannot set both taskNameIn and…
Error message
Invalid query usage: cannot set both taskNameIn and taskNameLikeIgnoreCase
What it means
Query usage conflict in HistoricTaskInstanceQuery.taskNameIn: the taskNameLikeIgnoreCase criterion is already set on the same query, and combining it with an IN-list of names would be ambiguous, so the call is rejected.
Solutions
- Use only one task-name filter per query
- Reset or rebuild the query instead of stacking name filters
- Combine alternatives with or() if an inclusive match is intended
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/HistoricTaskInstanceQueryImpl.java:752 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/060a2cb3dd99c0a4.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/HistoricTaskInstanceQueryImpl.java:752
}
@Override
public HistoricTaskInstanceQuery taskNameIn(Collection<String> taskNameList) {
if (taskNameList == null) {
throw new FlowableIllegalArgumentException("Task name list is null");
}
if (taskNameList.isEmpty()) {
throw new FlowableIllegalArgumentException("Task name list is empty");
}
if (taskName != null) {
throw new FlowableIllegalArgumentException("Invalid query usage: cannot set both taskNameIn and taskName");
}
if (taskNameLike != null) {
throw new FlowableIllegalArgumentException("Invalid query usage: cannot set both taskNameIn and taskNameLike");
}
if (taskNameLikeIgnoreCase != null) {
throw new FlowableIllegalArgumentException("Invalid query usage: cannot set both taskNameIn and taskNameLikeIgnoreCase");
}
if (inOrStatement) {
currentOrQueryObject.taskNameList = taskNameList;
} else {
this.taskNameList = taskNameList;
}
return this;
}
@Override
public HistoricTaskInstanceQuery taskNameInIgnoreCase(Collection<String> taskNameList) {
if (taskNameList == null) {
throw new FlowableIllegalArgumentException("Task name list is null");
}
if (taskNameList.isEmpty()) {
throw new FlowableIllegalArgumentException("Task name list is empty");
}View on GitHub (pinned to d6d39ce1c6)