flowable/flowable-engine · error · FlowableIllegalArgumentException
Value-only query (without a variable-name) is only supported
Error message
Value-only query (without a variable-name) is only supported when using 'equals' operation.
What it means
FlowableIllegalArgumentException for value-only variable queries: omitting the variable name is allowed only with the 'equals' operation, because any other comparator is meaningless without a name to match on.
Source
Thrown at modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/history/caze/HistoricCaseInstanceBaseResource.java:325
protected void addVariables(HistoricCaseInstanceQuery caseInstanceQuery, 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 && variable.getVariableOperation() != QueryVariableOperation.EQUALS) {
throw new FlowableIllegalArgumentException("Value-only query (without a variable-name) is only supported when using 'equals' operation.");
}
switch (variable.getVariableOperation()) {
case EQUALS:
if (nameLess) {
caseInstanceQuery.variableValueEquals(actualValue);
} else {
caseInstanceQuery.variableValueEquals(variable.getName(), actualValue);
}
break;
case EQUALS_IGNORE_CASE:
if (actualValue instanceof String) {
caseInstanceQuery.variableValueEqualsIgnoreCase(variable.getName(), (String) actualValue);
} else {
throw new FlowableIllegalArgumentException("Only string variable values are supported when ignoring casing, but was: " + actualValue.getClass().getName());
}View on GitHub (pinned to d6d39ce1c6)
Solutions
- Keep operation "equals" when querying by value only
- Add a variable "name" if you need like/notEquals/greaterThan semantics
- Split the query into an equals-by-value request plus follow-up filtering
- Validate: name==null implies operation must be equals
Example fix
// before
{"value":"abc","operation":"like"}
// after
{"value":"abc","operation":"equals"} // or add "name":"myVar" Defensive patterns
Strategy: validation
Validate before calling
if (name == null && !"equals".equals(operation))
throw new IllegalArgumentException("Value-only query requires equals operation"); Type guard
boolean validValueOnlyQuery(Map<String,Object> v) {
return v.get("name") != null || "equals".equals(v.get("operation"));
} Try / catch
try { ... } catch (FlowableIllegalArgumentException e) {
return badRequest("Unsupported value-only query: " + e.getMessage());
} Prevention
- Remember nameless queries support only equals
- Add a name when using other comparators
- Encode this constraint in your query builder
When it happens
Trigger: POST query with {"value":"abc","operation":"like"} (or any non-equals operation) and no "name".
Common situations: Searching for any variable holding a given value: users generalize the pattern and swap equals for like/greaterThan while still omitting name.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Variable operation is missing for variable: ${variable.getNa
- Variable value is missing for variable: ${variable.getName()
- Only string variable values are supported when ignoring casi
- Only string variable values are supported for like, but was:
- Variable operation is missing for variable:
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/d08c96c7c199be94.
Report an issue: GitHub.