flowable/flowable-engine · error · FlowableIllegalArgumentException
Unsupported variable query operation: " + variable.getVariab
Error message
Unsupported variable query operation: " + variable.getVariableOperation()
What it means
The addVariables switch handles the full set of supported VariableQueryOperand values; an unrecognized or unimplemented variableOperation falls into the default branch and throws FlowableIllegalArgumentException. This protects the query API from silently ignoring malformed operations.
Source
Thrown at modules/flowable-rest/src/main/java/org/flowable/rest/service/api/history/HistoricProcessInstanceBaseResource.java:394
case LESS_THAN:
processInstanceQuery.variableValueLessThan(variable.getName(), actualValue);
break;
case LESS_THAN_OR_EQUALS:
processInstanceQuery.variableValueLessThanOrEqual(variable.getName(), actualValue);
break;
case EXISTS:
processInstanceQuery.variableExists(variable.getName());
break;
case NOT_EXISTS:
processInstanceQuery.variableNotExists(variable.getName());
break;
default:
throw new FlowableIllegalArgumentException("Unsupported variable query operation: " + variable.getVariableOperation());
}
}
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Use one of the supported operations: EQUALS, NOT_EQUALS, EQUALS_IGNORE_CASE, NOT_EQUALS_IGNORE_CASE, LIKE, LIKE_IGNORE_CASE, GREATER_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN, LESS_THAN_OR_EQUAL, EXISTS, NOT_EXISTS
- Check for typos and exact casing of variableOperation in the request JSON
- Verify the client's targeted Flowable REST version supports the operation being sent
Example fix
// before
{"name":"status","value":"open","variableOperation":"equal"}
// after
{"name":"status","value":"open","variableOperation":"EQUALS"} Defensive patterns
Strategy: validation
Validate before calling
const OPS = ['EQUALS','NOT_EQUALS','EQUALS_IGNORE_CASE','NOT_EQUALS_IGNORE_CASE','LIKE','LIKE_IGNORE_CASE','GREATER_THAN','GREATER_THAN_OR_EQUAL','LESS_THAN','LESS_THAN_OR_EQUAL','EXISTS','NOT_EXISTS']; if (!OPS.includes(variable.variableOperation)) throw new Error('Unsupported operation: ' + variable.variableOperation); Type guard
const isValidOp = (op) => OPS.includes(op);
Try / catch
catch (e) { if (e.response && e.response.status === 400 && /Unsupported variable query operation/.test(e.response.data.message)) { /* fix operation and retry */ } throw e; } Prevention
- Centralize the enum of valid operations in the client
- Never send null variableOperation unless using EXISTS/NOT_EXISTS which ignore value
- Pin client SDK to the server's Flowable version
When it happens
Trigger: Sending a variable query entry whose variableOperation is null, misspelled, or an enum value not supported for historic process instance queries (e.g. an operation only valid elsewhere in the API).
Common situations: Typos in variableOperation strings in hand-written JSON; clients written against a different Flowable REST version with additional operations; deserialization producing an unexpected enum/null value.
Related errors
- Only string variable values are supported when ignoring casi
- Illegal action: '" + request.getAction() + "'.
- Variable operation is missing for variable: " + variable.get
- Variable value is missing for variable: " + variable.getName
- Value-only query (without a variable-name) is not supported.
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/e40a384a2d961c26.
Report an issue: GitHub.