flowable/flowable-engine · error · FlowableIllegalArgumentException
Unsupported variable query operation:
Error message
Unsupported variable query operation:
What it means
The default branch of the variable-operation switch in HistoricTaskInstanceBaseResource.addTaskVariables rejects any QueryVariableOperation that is not one of the explicitly handled cases (EQUALS, NOT_EQUALS, IGNORE_CASE variants, LIKE variants, GREATER_THAN, etc.). An unknown or out-of-range operation value cannot be mapped to a taskInstanceQuery method, so FlowableIllegalArgumentException is thrown.
Source
Thrown at modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/history/task/HistoricTaskInstanceBaseResource.java:409
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
- Fix the variableOperation value to one of the supported enum names (EQUALS, NOT_EQUALS, EQUALS_IGNORE_CASE, NOT_EQUALS_IGNORE_CASE, LIKE, LIKE_IGNORE_CASE, GREATER_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN, LESS_THAN_OR_EQUALS, EXISTS, NOT_EXISTS).
- Align client library version with the Flowable server version.
- Validate the operation client-side against the enum before sending the request.
- Catch FlowableIllegalArgumentException and log the offending operation for diagnosis.
Example fix
// before
{"name": "status", "value": "open", "variableOperation": "CONTAINS"}
// after
{"name": "status", "value": "open", "variableOperation": "EQUALS"} Defensive patterns
Strategy: validation
Validate before calling
Set<String> allowed = Set.of("EQUALS","NOT_EQUALS","EQUALS_IGNORE_CASE","NOT_EQUALS_IGNORE_CASE","LIKE","LIKE_IGNORE_CASE","GREATER_THAN","GREATER_THAN_OR_EQUALS","LESS_THAN","LESS_THAN_OR_EQUALS","EXISTS","NOT_EXISTS");
if (!allowed.contains(variableOperation)) throw new IllegalArgumentException("Unsupported variableOperation: " + variableOperation); Try / catch
try { return queryTasks(variableFilters); } catch (FlowableIllegalArgumentException e) { if (e.getMessage().startsWith("Unsupported variable query operation")) { /* fix enum in client config */ } throw e; } Prevention
- Generate filter operations from the QueryVariableOperation enum, not free-form strings.
- Keep client Flowable version aligned with the server.
- Add an enum-validated DTO for query variables.
When it happens
Trigger: GET /cmmn-history/historic-task-instances with a task variable filter whose variableOperation does not match any known QueryVariableOperation enum value (e.g. a typo like 'EQUALSS' or an operation from a newer Flowable version not present in this release).
Common situations: Client SDKs out of sync with server version; hand-written query strings with misspelled operations; copy-pasted operations from task-runtime endpoints not supported by this historic-query handler.
Related errors
- Unsupported variable query operation: ${variable.getVariable
- Only string variable values are supported using like, but wa
- Variable operation is missing for variable:
- Variable value is missing for variable:
- Variable operation is missing for variable: ${name}
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/a941b46c43a3cc4b.
Report an issue: GitHub.