flowable/flowable-engine · error · FlowableIllegalArgumentException
Unsupported variable query operation:
Error message
Unsupported variable query operation:
What it means
HistoricVariableInstanceBaseResource.addVariables translates a query request's variableOperation enum into CmmnHistoricTaskInstanceQuery/HistoricVariableInstanceQuery calls. If the operation value sent by the client is not one of the supported ones (EQUALS, EQUALS_IGNORE_CASE, NOT_EQUALS, etc.), the switch default throws FlowableIllegalArgumentException naming the unsupported operation.
Source
Thrown at modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/history/variable/HistoricVariableInstanceBaseResource.java:141
}
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:
variableInstanceQuery.variableValueEquals(variable.getName(), actualValue);
break;
default:
throw new FlowableIllegalArgumentException("Unsupported variable query operation: " + variable.getVariableOperation());
}
}
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Set variableOperation to one of the supported values: EQUALS, EQUALS_IGNORE_CASE, NOT_EQUALS, NOT_EQUALS_IGNORE_CASE, GREATER_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN, LESS_THAN_OR_EQUALS, LIKE, LIKE_IGNORE_CASE.
- Log the exact request payload and verify the operation field is populated and upper-case.
- If a needed operation is genuinely unsupported by the REST layer, query the engine API directly (historyService) instead of the REST endpoint.
Example fix
// before
{"name":"status","type":"string","value":"active","variableOperation":"EQ"}
// after
{"name":"status","type":"string","value":"active","variableOperation":"EQUALS"} Defensive patterns
Strategy: validation
Validate before calling
const OPS=["EQUALS","EQUALS_IGNORE_CASE","NOT_EQUALS","NOT_EQUALS_IGNORE_CASE","GREATER_THAN","GREATER_THAN_OR_EQUALS","LESS_THAN","LESS_THAN_OR_EQUALS","LIKE","LIKE_IGNORE_CASE"];
if (!OPS.includes(variableQuery.variableOperation)) throw new Error(`Unsupported variableOperation: ${variableQuery.variableOperation}`); Prevention
- Use the engine's enum/constant class instead of raw strings for variableOperation.
- Uppercase operation values before sending.
- Test variable query URLs against a known-good payload.
When it happens
Trigger: A REST call to /cmmn-history/historic-task-instances (or historic variable query endpoints) with a variableQuery parameter whose variableOperation is misspelled, empty, or outside the supported enum (e.g. variableOperation=LIKE or a blank value).
Common situations: Clients upgraded to Flowable sending operation names from other workflow engines; hand-built query URLs with typos like 'operation=equals' instead of 'EQUALS'; passing a null/empty operation when constructing the variable query JSON.
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
- Only one of 'timersOnly' or 'messagesOnly' can be provided.
- Only one of 'timersOnly' or 'messagesOnly' can be provided.
- Only one of 'timersOnly' or 'messagesOnly' can be provided.
- Variable value is missing for variable: ${name}
- Value-only query (without a variable-name) is only supported
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/aa15f57900a5a3c7.
Report an issue: GitHub.