{"record":{"id":"67f091a807729f9d","repo":"flowable/flowable-engine","slug":"only-string-variable-values-are-supported-when-ign-67f091","errorCode":null,"errorMessage":"Only string variable values are supported when ignoring casing, but was: \" + actualValue.getClass().getName()","messagePattern":"Only string variable values are supported when ignoring casing, but was: \" \\+ actualValue\\.getClass\\(\\)\\.getName\\(\\)","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-rest/src/main/java/org/flowable/rest/service/api/history/HistoricTaskInstanceBaseResource.java","lineNumber":371,"sourceCode":"\n            Object actualValue = restResponseFactory.getVariableValue(variable);\n\n            // A value-only query is only possible using equals-operator\n            if (nameLess) {\n                throw new FlowableIllegalArgumentException(\"Value-only query (without a variable-name) is not supported.\");\n            }\n\n            switch (variable.getVariableOperation()) {\n\n            case EQUALS:\n                taskInstanceQuery.taskVariableValueEquals(variable.getName(), actualValue);\n                break;\n\n            case EQUALS_IGNORE_CASE:\n                if (actualValue instanceof String) {\n                    taskInstanceQuery.taskVariableValueEqualsIgnoreCase(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                taskInstanceQuery.taskVariableValueNotEquals(variable.getName(), actualValue);\n                break;\n\n            case NOT_EQUALS_IGNORE_CASE:\n                if (actualValue instanceof String) {\n                    taskInstanceQuery.taskVariableValueNotEqualsIgnoreCase(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                taskInstanceQuery.taskVariableValueGreaterThan(variable.getName(), actualValue);\n                break;","sourceCodeStart":353,"sourceCodeEnd":389,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/history/HistoricTaskInstanceBaseResource.java#L353-L389","documentation":"The equalsIgnoreCase variable comparison in historic task queries only supports String values; Flowable throws FlowableIllegalArgumentException with the actual value's class name when the deserialized value is not a String (e.g. Integer, Boolean, Date).","triggerScenarios":"POST /query/historic-tasks with a taskVariables entry using operation 'equalsIgnoreCase' whose value deserializes to a non-String type (numeric 5, boolean true, etc.).","commonSituations":"Client sends unquoted numbers/booleans in JSON; case-insensitive match attempted on an int/long variable; type drift after a variable type changed between versions.","solutions":["Send the value as a JSON string: {\"operation\":\"equalsIgnoreCase\",\"value\":\"foo\"}","For non-string variables switch to the type-specific 'equals'/'notEquals' operations instead of ignore-case variants","Convert the variable to a String in the process data if case-insensitive comparison is required"],"exampleFix":"// before\n{\"name\":\"level\",\"operation\":\"equalsIgnoreCase\",\"value\":5}\n// after\n{\"name\":\"level\",\"operation\":\"equals\",\"value\":5}\n// or keep ignore-case with a string:\n{\"name\":\"level\",\"operation\":\"equalsIgnoreCase\",\"value\":\"high\"}","handlingStrategy":"type-guard","validationCode":"if (!(variable.getValue() instanceof String))\n    throw new IllegalArgumentException(\"equalsIgnoreCase requires a String value\");","typeGuard":"boolean isStringFilter(QueryVariable v) { return v.getValue() instanceof String; }","tryCatchPattern":"try { queryTaskVariables(vars); }\ncatch (FlowableIllegalArgumentException e) { /* fall back to equals */ }","preventionTips":["Quote string values in JSON to avoid numeric coercion","Use equals for non-string types","Only use ignore-case operators for genuinely textual variables"],"tags":["rest-api","validation","type-mismatch","query-variables","flowable"],"backgroundTag":"type-mismatch","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}