{"record":{"id":"08c352fa51e3d05e","repo":"flowable/flowable-engine","slug":"only-string-variable-values-are-supported-when-ign-08c352","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: (.+?)","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/history/task/HistoricTaskInstanceBaseResource.java","lineNumber":352,"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":334,"sourceCodeEnd":370,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/history/task/HistoricTaskInstanceBaseResource.java#L334-L370","documentation":"FlowableIllegalArgumentException thrown when EQUALS_IGNORE_CASE is used with a non-String variable value. Case-insensitive comparison is only defined for strings, so Flowable rejects numeric, boolean, date, or other value types with a 400 error naming the offending Java class.","triggerScenarios":"POST /cmmn-history/historic-task-instances/query with {\"name\":\"count\",\"operation\":\"EQUALS_IGNORE_CASE\",\"value\":5} - any non-string value under EQUALS_IGNORE_CASE in addTaskVariables.","commonSituations":"Generic UIs letting users pick 'ignore case' for any variable type; JSON numbers/booleans deserialized to non-String objects; variables stored as Integer/Date mistakenly queried with ignore-case semantics.","solutions":["Change the operation to EQUALS (or NOT_EQUALS) for non-string values: {\"name\":\"count\",\"operation\":\"EQUALS\",\"value\":5}.","If case-insensitive matching is truly needed, send the value as a string: {\"value\":\"kermit\",\"operation\":\"EQUALS_IGNORE_CASE\"}.","Client-side: only offer EQUALS_IGNORE_CASE/NOT_EQUALS_IGNORE_CASE when typeof value === 'string'.","Normalize the variable to a string type in the process/task data if ignore-case search is a requirement."],"exampleFix":"// before\n{\"name\":\"count\",\"operation\":\"EQUALS_IGNORE_CASE\",\"value\":5}\n// after\n{\"name\":\"count\",\"operation\":\"EQUALS\",\"value\":5}","handlingStrategy":"validation","validationCode":"function validateIgnoreCase(v) {\n  if ((v.operation === \"EQUALS_IGNORE_CASE\") && typeof v.value !== \"string\") {\n    throw new Error(\"EQUALS_IGNORE_CASE requires a string value\");\n  }\n}","typeGuard":"const canIgnoreCase = (v) => typeof v.value === 'string';","tryCatchPattern":null,"preventionTips":["Only expose *_IGNORE_CASE operations for string-typed variables.","Coerce or reject numbers/booleans/dates before sending.","Prefer EQUALS for typed (non-string) variables."],"tags":["flowable","rest","validation","type-mismatch"],"backgroundTag":"type-mismatch","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}