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

FlowableIllegalArgumentException thrown when NOT_EQUALS_IGNORE_CASE is used with a non-String variable value. As with EQUALS_IGNORE_CASE, case-insensitive comparison is only supported for strings; any other type (Integer, Boolean, Date, etc.) triggers this 400 error with the actual value's class name in the message.

Source

Thrown at modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/history/task/HistoricTaskInstanceBaseResource.java:364

                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

  1. Use NOT_EQUALS for non-string values: {"name":"flag","operation":"NOT_EQUALS","value":true}.
  2. Send the value as a string if ignore-case comparison is intended: {"value":"closed","operation":"NOT_EQUALS_IGNORE_CASE"}.
  3. Guard client-side so ignore-case operations are only selectable for string values.
  4. Cast/convert the variable data to String in the engine data model if case-insensitive exclusion is a hard requirement.

Example fix

// before
{"name":"flag","operation":"NOT_EQUALS_IGNORE_CASE","value":true}
// after
{"name":"flag","operation":"NOT_EQUALS","value":true}
Defensive patterns

Strategy: validation

Validate before calling

function validateIgnoreCase(v) {
  if ((v.operation === "NOT_EQUALS_IGNORE_CASE") && typeof v.value !== "string") {
    throw new Error("NOT_EQUALS_IGNORE_CASE requires a string value");
  }
}

Type guard

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

Prevention

When it happens

Trigger: POST /cmmn-history/historic-task-instances/query with {"name":"status","operation":"NOT_EQUALS_IGNORE_CASE","value":true} - any non-string value under NOT_EQUALS_IGNORE_CASE.

Common situations: Same as EQUALS_IGNORE_CASE: dynamic query builders applying ignore-case to every filter; booleans/numbers/dates passed where strings are required; schema changes turning former string variables into typed values.

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