{"record":{"id":"33cfae6847486a06","repo":"flowable/flowable-engine","slug":"only-string-variable-values-are-supported-when-ign-33cfae","errorCode":null,"errorMessage":"Only string variable values are supported when ignoring casing, but was: ","messagePattern":"Only string variable values are supported when ignoring casing, but was: ","errorType":"http","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-rest/src/main/java/org/flowable/rest/service/api/runtime/task/TaskBaseResource.java","lineNumber":515,"sourceCode":"            if (nameLess && variable.getVariableOperation() != QueryVariableOperation.EQUALS) {\n                throw new FlowableIllegalArgumentException(\"Value-only query (without a variable-name) is only supported when using 'equals' operation.\");\n            }\n\n            switch (variable.getVariableOperation()) {\n\n            case EQUALS:\n                if (nameLess) {\n                    taskQuery.processVariableValueEquals(actualValue);\n                } else {\n                    taskQuery.processVariableValueEquals(variable.getName(), actualValue);\n                }\n                break;\n\n            case EQUALS_IGNORE_CASE:\n                if (actualValue instanceof String) {\n                    taskQuery.processVariableValueEqualsIgnoreCase(variable.getName(), (String) actualValue);\n                } else {\n                    throw new FlowableIllegalArgumentException(\"Only string variable values are supported when ignoring casing, but was: \" + actualValue.getClass().getName());\n                }\n                break;\n\n            case NOT_EQUALS:\n                taskQuery.processVariableValueNotEquals(variable.getName(), actualValue);\n                break;\n\n            case NOT_EQUALS_IGNORE_CASE:\n                if (actualValue instanceof String) {\n                    taskQuery.processVariableValueNotEqualsIgnoreCase(variable.getName(), (String) actualValue);\n                } else {\n                    throw new FlowableIllegalArgumentException(\"Only string variable values are supported when ignoring casing, but was: \" + actualValue.getClass().getName());\n                }\n                break;\n\n            case GREATER_THAN:\n                taskQuery.processVariableValueGreaterThan(variable.getName(), actualValue);\n                break;","sourceCodeStart":497,"sourceCodeEnd":533,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/runtime/task/TaskBaseResource.java#L497-L533","documentation":"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.","triggerScenarios":"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.).","commonSituations":"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.","solutions":["Quote the value in the JSON request body so it is sent as a String (value: \"123\" instead of value: 123).","If the variable is genuinely non-String, switch variableOperation to EQUALS which supports all variable types.","On the client, force the variable value to be serialized as a string before calling the query API.","Ensure the REST request has Content-Type: application/json so Jackson maps value types predictably."],"exampleFix":"// before\n{\"processVariable\": \"status\", \"variableOperation\": \"EQUALS_IGNORE_CASE\", \"value\": 123}\n// after\n{\"processVariable\": \"status\", \"variableOperation\": \"EQUALS_IGNORE_CASE\", \"value\": \"123\"}","handlingStrategy":"validation","validationCode":"if (variable.getValue() != null && !(variable.getValue() instanceof String)) {\n    throw new IllegalArgumentException(\"EQUALS_IGNORE_CASE requires a String value for variable \" + variable.getName());\n}","typeGuard":"function isStringVar(v) { return typeof v.value === 'string'; }","tryCatchPattern":"try {\n    // task query call\n} catch (FlowableIllegalArgumentException e) {\n    if (e.getMessage().contains(\"Only string variable values are supported when ignoring casing\")) {\n        // resend with quoted string value or EQUALS operation\n    } else throw e;\n}","preventionTips":["Quote string values in JSON query bodies","Use EQUALS for non-String variable types","Validate operation/value type pairs before calling the REST API"],"tags":["rest-api","validation","flowable","type-mismatch"],"backgroundTag":"invalid-argument-value","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T16:30:33.424Z"}