flowable/flowable-engine · error · FlowableIllegalArgumentException

Only string variable values are supported when ignoring…

Error message

Only string variable values are supported when ignoring casing, but was: ${actualValue.getClass().getName()}

What it means

EQUALS_IGNORE_CASE case-insensitive comparison is only implemented for string variables in the query engine. If the resolved value object is not a java.lang.String (e.g. Integer, Boolean, Date), addVariables throws FlowableIllegalArgumentException reporting the value's actual class.

Solutions

  1. Use EQUALS instead of EQUALS_IGNORE_CASE for non-string values.
  2. Ensure the value is sent as a JSON string for case-insensitive matching: {"name":"status","value":"ACTIVE","operation":"EQUALS_IGNORE_CASE"}.
  3. If the variable truly stores a number/boolean, normalize case sensitivity at the application level and query with EQUALS.
  4. Client-side: only apply ignoreCase operations to filters whose values are strings.

Example fix

// before
{"name":"count","value":5,"operation":"EQUALS_IGNORE_CASE"}

// after
{"name":"count","value":5,"operation":"EQUALS"}
Defensive patterns

Strategy: type-guard

Validate before calling

if (v.operation === 'EQUALS_IGNORE_CASE' && typeof v.value !== 'string')
  throw new Error('EQUALS_IGNORE_CASE supports string values only');

Type guard

function isStringFilter(v) { return v.operation === 'EQUALS_IGNORE_CASE' && typeof v.value === 'string'; }

Prevention

When it happens

Trigger: Case-instance query with a variables entry using operation EQUALS_IGNORE_CASE whose value parses to a non-string, e.g. {"name":"count","value":"5","operation":"EQUALS_IGNORE_CASE"} resolved to Integer, or a JSON number/boolean value.

Common situations: Generic query builders that apply ignore-case to every text-typed input, numeric ids sent as numbers, dates formatted as strings intended for ignore-case match, or Booleans queried case-insensitively.

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


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/07a8d13f9916b98f. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/caze/BaseCaseInstanceResource.java:335

            if (nameLess && variable.getVariableOperation() != QueryVariableOperation.EQUALS) {
                throw new FlowableIllegalArgumentException("Value-only query (without a variable-name) is only supported when using 'equals' operation.");
            }

            switch (variable.getVariableOperation()) {

            case EQUALS:
                if (nameLess) {
                    caseInstanceQuery.variableValueEquals(actualValue);
                } else {
                    caseInstanceQuery.variableValueEquals(variable.getName(), actualValue);
                }
                break;

            case EQUALS_IGNORE_CASE:
                if (actualValue instanceof String) {
                    caseInstanceQuery.variableValueEqualsIgnoreCase(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:
                caseInstanceQuery.variableValueNotEquals(variable.getName(), actualValue);
                break;

            case NOT_EQUALS_IGNORE_CASE:
                if (actualValue instanceof String) {
                    caseInstanceQuery.variableValueNotEqualsIgnoreCase(variable.getName(), (String) actualValue);
                } else {
                    throw new FlowableIllegalArgumentException("Only string variable values are supported when ignoring casing, but was: " + actualValue.getClass().getName());
                }
                break;

            case LIKE:
                if (actualValue instanceof String) {
                    caseInstanceQuery.variableValueLike(variable.getName(), (String) actualValue);

View on GitHub (pinned to d6d39ce1c6)