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: ${type}

What it means

The EQUALS_IGNORECASE query operation can only be implemented for String values; Flowable cannot case-insensitively compare other variable types. If the REST payload's value is converted to a non-String type (number, boolean, date, ...) while using equalsIgnoreCase, addVariables throws FlowableIllegalArgumentException with the actual Java class name.

Solutions

  1. Use plain 'equals' for non-string variable values.
  2. Quote the value in the request so it is treated as a String (e.g. "123" instead of 123).
  3. Check the actual variable type stored in the engine and match the query operation accordingly.
  4. Catch FlowableIllegalArgumentException (HTTP 400) and log the class name reported in the message.

Example fix

// before
{"name":"priority","variableOperation":"equalsIgnoreCase","value":5}
// after
{"name":"priority","variableOperation":"equals","value":5}
Defensive patterns

Strategy: validation

Validate before calling

if (op === 'equalsIgnoreCase' && typeof value !== 'string') throw new Error('equalsIgnoreCase requires a string value');

Type guard

const canIgnoreCase = (f) => typeof f.value === 'string';

Try / catch

try { await query(body); } catch (e) { if (e.status === 400 && /ignoring casing/.test(e.message)) { /* switch to plain equals */ } else { throw e; } }

Prevention

When it happens

Trigger: Plan-item-instance query with variableOperation 'equalsIgnoreCase' (or in the NOT_EQUALS branch: 'notEqualsIgnoreCase') and a variable value that the RestResponseFactory converts to a non-String object, e.g. value=123 (Integer) or true (Boolean).

Common situations: Querying a boolean/numeric variable and using ignore-case to 'be safe'; API clients sending JSON numbers where the persisted variable is expected to be a string.

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/afe72f49edee5f41. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/planitem/PlanItemInstanceBaseResource.java:192

                    }
                } else {
                    if (isCase) {
                        planItemInstanceQuery.caseVariableValueEquals(variable.getName(), actualValue);
                    } else {
                        planItemInstanceQuery.variableValueEquals(variable.getName(), actualValue);
                    }
                }
                break;

            case EQUALS_IGNORE_CASE:
                if (actualValue instanceof String) {
                    if (isCase) {
                        planItemInstanceQuery.caseVariableValueEqualsIgnoreCase(variable.getName(), (String) actualValue);
                    } else {
                        planItemInstanceQuery.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:
                if (isCase) {
                    planItemInstanceQuery.caseVariableValueNotEquals(variable.getName(), actualValue);
                } else {
                    planItemInstanceQuery.variableValueNotEquals(variable.getName(), actualValue);
                }
                break;

            case NOT_EQUALS_IGNORE_CASE:
                if (actualValue instanceof String) {
                    if (isCase) {
                        planItemInstanceQuery.caseVariableValueNotEqualsIgnoreCase(variable.getName(), (String) actualValue);
                    } else {
                        planItemInstanceQuery.variableValueNotEqualsIgnoreCase(variable.getName(), (String) actualValue);
                    }

View on GitHub (pinned to d6d39ce1c6)