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:
What it means
The historic task variable query used a variable filter with EQUALS_IGNORE_CASE on a value that is not a String; case-insensitive comparison is only defined for string values, so the non-string value's class is reported.
Source
Thrown at modules/flowable-rest/src/main/java/org/flowable/rest/service/api/history/HistoricTaskInstanceBaseResource.java:383
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;
case GREATER_THAN_OR_EQUALS:
taskInstanceQuery.taskVariableValueGreaterThanOrEqual(variable.getName(), actualValue);
break;
case LESS_THAN:
taskInstanceQuery.taskVariableValueLessThan(variable.getName(), actualValue);
break;
case LESS_THAN_OR_EQUALS:
taskInstanceQuery.taskVariableValueLessThanOrEqual(variable.getName(), actualValue);
break;View on GitHub (pinned to d6d39ce1c6)
Solutions
- Use 'notEquals' (case-sensitive, type-aware) for non-string values
- Quote the value in JSON so it is a String when ignore-case semantics are truly needed
- Ensure the historic variable is stored as a string if case-insensitive comparison is a requirement
Example fix
// before
{"name":"state","operation":"notEqualsIgnoreCase","value":42}
// after
{"name":"state","operation":"notEquals","value":42} Defensive patterns
Strategy: type-guard
Validate before calling
if (!(variable.getValue() instanceof String))
throw new IllegalArgumentException("notEqualsIgnoreCase requires a String value"); Type guard
boolean isStringFilter(QueryVariable v) { return v.getValue() instanceof String; } Try / catch
try { queryTaskVariables(vars); }
catch (FlowableIllegalArgumentException e) { /* fall back to notEquals */ } Prevention
- Use notEquals for numeric/boolean exclusion filters
- Quote JSON string values explicitly
- Keep variable types consistent between process and queries
When it happens
Trigger: POST /query/historic-tasks with a taskVariables entry using operation 'notEqualsIgnoreCase' and a non-string value (number, boolean, date).
Common situations: Unquoted JSON numbers; client reusing ignore-case operator for a numeric exclusion filter; value converted to Integer by the REST variable factory.
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 using like, but wa
- Only string variable values are supported when ignoring casi
- Variable operation is missing for variable: " + variable.get
- Variable value is missing for variable: " + variable.getName
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/7fdefa85ccc4273b.
Report an issue: GitHub.