flowable/flowable-engine · error · FlowableIllegalArgumentException
Unsupported variable query operation:
Error message
Unsupported variable query operation:
What it means
Thrown by addTaskVariables in HistoricTaskInstanceBaseResource when a task variable query predicate uses a QueryVariableOperation that the historic task instance query cannot map to a taskVariable* method. The switch only handles EQUALS, NOT_EQUALS, EQUALS_IGNORE_CASE, NOT_EQUALS_IGNORE_CASE, LIKE, LIKE_IGNORE_CASE, GREATER_THAN(_OR_EQUALS), LESS_THAN(_OR_EQUALS), EXISTS and NOT_EXISTS; anything else hits the default branch. This means the REST request supplied an operation value outside the supported set.
Source
Thrown at modules/flowable-rest/src/main/java/org/flowable/rest/service/api/history/HistoricTaskInstanceBaseResource.java:428
case LIKE_IGNORE_CASE:
if (actualValue instanceof String) {
taskInstanceQuery.taskVariableValueLikeIgnoreCase(variable.getName(), (String) actualValue);
} else {
throw new FlowableIllegalArgumentException("Only string variable values are supported using like, but was: " + actualValue.getClass().getName());
}
break;
case EXISTS:
taskInstanceQuery.taskVariableExists(variable.getName());
break;
case NOT_EXISTS:
taskInstanceQuery.taskVariableNotExists(variable.getName());
break;
default:
throw new FlowableIllegalArgumentException("Unsupported variable query operation: " + variable.getVariableOperation());
}
}
}
protected void addProcessVariables(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);View on GitHub (pinned to d6d39ce1c6)
Solutions
- Use one of the supported operations: equals, notEquals, equalsIgnoreCase, notEqualsIgnoreCase, like, likeIgnoreCase, greaterThan, greaterThanOrEquals, lessThan, lessThanOrEquals, exists, notExists.
- Check spelling/casing of the variable op in the query string; the value must deserialize into QueryVariableOperation.
- If a genuinely new operation is needed, upgrade Flowable to a version whose addTaskVariables supports it.
Example fix
// before GET /flowable-rest/history/historic-task-instances?taskVariable=eq==status/active // after GET /flowable-rest/history/historic-task-instances?taskVariable=equals==status/active
Defensive patterns
Strategy: validation
Validate before calling
const OPS = ['equals','notEquals','equalsIgnoreCase','notEqualsIgnoreCase','like','likeIgnoreCase','greaterThan','greaterThanOrEquals','lessThan','lessThanOrEquals','exists','notExists'];
if (!OPS.includes(q.taskVariableOp)) throw new Error('Unsupported task variable op: ' + q.taskVariableOp); Prevention
- Centralize the allowed variable-operation list in your client
- Never hand-concatenate variable query parameters without an op whitelist
When it happens
Trigger: Calling GET /history/historic-task-instances?taskVariable=op=<operation><name><value> (or POST variant) with an unsupported operation string for a task-scope variable. For example a typo like 'eq' or an operation valid in another endpoint but not in the query-variables mapper.
Common situations: Hand-built query strings with mistyped operation tokens; client code copied from process-variable endpoints; upgrading clients sending new operations an older Flowable REST layer does not recognize.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Variable operation is missing for variable:
- Variable value is missing for variable:
- Task has no form defined
- Could not find a case instance with id '${caseInstanceId}'.
- Variable operation is missing for variable: ${variable.getNa
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/45d81147945b1294.
Report an issue: GitHub.