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: 

What it means

Flowable's REST task query API throws FlowableIllegalArgumentException when a process-variable query predicate uses EQUALS_IGNORE_CASE but the supplied variable value is not a String. Case-insensitive comparison is only defined for text variables, so any other type (Integer, Boolean, Date, etc.) is rejected before the query is built.

Solutions

  1. Quote the value in the JSON request body so it is sent as a String (value: "123" instead of value: 123).
  2. If the variable is genuinely non-String, switch variableOperation to EQUALS which supports all variable types.
  3. On the client, force the variable value to be serialized as a string before calling the query API.
  4. Ensure the REST request has Content-Type: application/json so Jackson maps value types predictably.

Example fix

// before
{"processVariable": "status", "variableOperation": "EQUALS_IGNORE_CASE", "value": 123}
// after
{"processVariable": "status", "variableOperation": "EQUALS_IGNORE_CASE", "value": "123"}
Defensive patterns

Strategy: validation

Validate before calling

if (variable.getValue() != null && !(variable.getValue() instanceof String)) {
    throw new IllegalArgumentException("EQUALS_IGNORE_CASE requires a String value for variable " + variable.getName());
}

Type guard

function isStringVar(v) { return typeof v.value === 'string'; }

Try / catch

try {
    // task query call
} catch (FlowableIllegalArgumentException e) {
    if (e.getMessage().contains("Only string variable values are supported when ignoring casing")) {
        // resend with quoted string value or EQUALS operation
    } else throw e;
}

Prevention

When it happens

Trigger: POST/GET to the task query REST endpoint (e.g. POST /runtime/tasks/query or query params on task list) with a processVariable entry whose variableOperation is EQUALS_IGNORE_CASE and whose value deserializes to a non-String type (number, boolean, etc.).

Common situations: Sending JSON without quotes around a value that is meant to be text (e.g. value: 123 instead of "123"), client-side serialization coercing strings to numbers/booleans, or copying a numeric-variable query and switching the operation to equalsIgnoreCase.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


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

Appendix: source

Thrown at modules/flowable-rest/src/main/java/org/flowable/rest/service/api/runtime/task/TaskBaseResource.java:515

            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) {
                    taskQuery.processVariableValueEquals(actualValue);
                } else {
                    taskQuery.processVariableValueEquals(variable.getName(), actualValue);
                }
                break;

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

            case NOT_EQUALS_IGNORE_CASE:
                if (actualValue instanceof String) {
                    taskQuery.processVariableValueNotEqualsIgnoreCase(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:
                taskQuery.processVariableValueGreaterThan(variable.getName(), actualValue);
                break;

View on GitHub (pinned to d6d39ce1c6)