flowable/flowable-engine · error · FlowableIllegalArgumentException
Only string variable values are supported when ignoring casi
Error message
Only string variable values are supported when ignoring casing, but was: ${actualValue.getClass().getName()} What it means
FlowableIllegalArgumentException thrown when EQUALS_IGNORE_CASE is used with a non-String variable value. Case-insensitive comparison is only defined for strings, so Flowable rejects numeric, boolean, date, or other value types with a 400 error naming the offending Java class.
Source
Thrown at modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/history/task/HistoricTaskInstanceBaseResource.java:352
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:
taskInstanceQuery.taskVariableValueEquals(variable.getName(), actualValue);
break;
case EQUALS_IGNORE_CASE:
if (actualValue instanceof String) {
taskInstanceQuery.taskVariableValueEqualsIgnoreCase(variable.getName(), (String) actualValue);
} else {
throw new FlowableIllegalArgumentException("Only string variable values are supported when ignoring casing, but was: " + actualValue.getClass().getName());
}
break;
case NOT_EQUALS:
taskInstanceQuery.taskVariableValueNotEquals(variable.getName(), actualValue);
break;
case NOT_EQUALS_IGNORE_CASE:
if (actualValue instanceof String) {
taskInstanceQuery.taskVariableValueNotEqualsIgnoreCase(variable.getName(), (String) actualValue);
} else {
throw new FlowableIllegalArgumentException("Only string variable values are supported when ignoring casing, but was: " + actualValue.getClass().getName());
}
break;
case GREATER_THAN:
taskInstanceQuery.taskVariableValueGreaterThan(variable.getName(), actualValue);
break;View on GitHub (pinned to d6d39ce1c6)
Solutions
- Change the operation to EQUALS (or NOT_EQUALS) for non-string values: {"name":"count","operation":"EQUALS","value":5}.
- If case-insensitive matching is truly needed, send the value as a string: {"value":"kermit","operation":"EQUALS_IGNORE_CASE"}.
- Client-side: only offer EQUALS_IGNORE_CASE/NOT_EQUALS_IGNORE_CASE when typeof value === 'string'.
- Normalize the variable to a string type in the process/task data if ignore-case search is a requirement.
Example fix
// before
{"name":"count","operation":"EQUALS_IGNORE_CASE","value":5}
// after
{"name":"count","operation":"EQUALS","value":5} Defensive patterns
Strategy: validation
Validate before calling
function validateIgnoreCase(v) {
if ((v.operation === "EQUALS_IGNORE_CASE") && typeof v.value !== "string") {
throw new Error("EQUALS_IGNORE_CASE requires a string value");
}
} Type guard
const canIgnoreCase = (v) => typeof v.value === 'string';
Prevention
- Only expose *_IGNORE_CASE operations for string-typed variables.
- Coerce or reject numbers/booleans/dates before sending.
- Prefer EQUALS for typed (non-string) variables.
When it happens
Trigger: POST /cmmn-history/historic-task-instances/query with {"name":"count","operation":"EQUALS_IGNORE_CASE","value":5} - any non-string value under EQUALS_IGNORE_CASE in addTaskVariables.
Common situations: Generic UIs letting users pick 'ignore case' for any variable type; JSON numbers/booleans deserialized to non-String objects; variables stored as Integer/Date mistakenly queried with ignore-case semantics.
Understand the failure class
Background: Type mismatch errors: IllegalArgumentException, TypeError and type guards across 150 open-source libraries — this error's family across 150 libraries.
Related errors
- Only string variable values are supported when ignoring casi
- Only string variable values are supported when ignoring casi
- Only string variable values are supported using like, but wa
- Variable '${restVariable.getName()}' has unsupported type: '
- Variable operation is missing for variable: ${variable.getNa
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/08c352fa51e3d05e.
Report an issue: GitHub.