flowable/flowable-engine · error · FlowableIllegalArgumentException
Value-only query (without a variable-name) is not supported.
Error message
Value-only query (without a variable-name) is not supported.
What it means
A nameless (value-only) variable filter, where only the value is supplied, is rejected for historic task queries. Flowable requires a variable name on every task variable query predicate and throws FlowableIllegalArgumentException.
Source
Thrown at modules/flowable-rest/src/main/java/org/flowable/rest/service/api/history/HistoricTaskInstanceBaseResource.java:358
protected void addTaskVariables(HistoricTaskInstanceQuery taskInstanceQuery, List<QueryVariable> variables) {
for (QueryVariable variable : variables) {
if (variable.getVariableOperation() == null) {
throw new FlowableIllegalArgumentException("Variable operation is missing for variable: " + variable.getName());
}
if (variable.getVariableOperation() != QueryVariableOperation.EXISTS && variable.getVariableOperation() != QueryVariableOperation.NOT_EXISTS) {
if (variable.getValue() == null) {
throw new FlowableIllegalArgumentException("Variable value is missing for variable: " + variable.getName());
}
}
boolean nameLess = variable.getName() == null;
Object actualValue = restResponseFactory.getVariableValue(variable);
// A value-only query is only possible using equals-operator
if (nameLess) {
throw new FlowableIllegalArgumentException("Value-only query (without a variable-name) is not supported.");
}
switch (variable.getVariableOperation()) {
case EQUALS:
taskInstanceQuery.taskVariableValueEquals(variable.getName(), actualValue);
break;
case EQUALS_IGNORE_CASE:
if (actualValue instanceof String) {
taskInstanceQuery.taskVariableValueEqualsIgnoreCase(variable.getName(), (String) actualValue);
} else {
throw new FlowableIllegalArgumentException("Only string variable values are supported when ignoring casing, but was: " + actualValue.getClass().getName());
}
break;
case NOT_EQUALS:
taskInstanceQuery.taskVariableValueNotEquals(variable.getName(), actualValue);View on GitHub (pinned to d6d39ce1c6)
Solutions
- Always include the variable 'name' in the filter object
- Remove the value-only entry and use a different search mechanism (e.g. query by process variables at process level if supported)
- Validate the request body client-side before posting
Example fix
// before
{"taskVariables":[{"operation":"equals","value":"foo"}]}
// after
{"taskVariables":[{"name":"myVar","operation":"equals","value":"foo"}]} Defensive patterns
Strategy: validation
Validate before calling
if (variable.getName() == null)
throw new IllegalArgumentException("variable name required in historic task query filter"); Prevention
- Always set the variable name in query filters
- Reject nameless filters in client-side request builders
- Review JSON payloads for empty name properties
When it happens
Trigger: POST query on historic task instances with a taskVariables entry that has a value but no 'name' property (variable.getName()==null) in addTaskVariables.
Common situations: Client assumes value-only search like some other query APIs support; JSON body builder drops empty name field; template expansion left name blank.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Variable operation is missing for variable: " + variable.get
- Variable value is missing for variable: " + variable.getName
- Only string variable values are supported when ignoring casi
- Only string variable values are supported when ignoring casi
- Only string variable values are supported using like, but wa
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/d85c8e27acb62383.
Report an issue: GitHub.