{"record":{"id":"7fdefa85ccc4273b","repo":"flowable/flowable-engine","slug":"only-string-variable-values-are-supported-when-ign-7fdefa","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/history/HistoricTaskInstanceBaseResource.java","lineNumber":383,"sourceCode":"                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;\n\n            case GREATER_THAN_OR_EQUALS:\n                taskInstanceQuery.taskVariableValueGreaterThanOrEqual(variable.getName(), actualValue);\n                break;\n\n            case LESS_THAN:\n                taskInstanceQuery.taskVariableValueLessThan(variable.getName(), actualValue);\n                break;\n\n            case LESS_THAN_OR_EQUALS:\n                taskInstanceQuery.taskVariableValueLessThanOrEqual(variable.getName(), actualValue);\n                break;","sourceCodeStart":365,"sourceCodeEnd":401,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/history/HistoricTaskInstanceBaseResource.java#L365-L401","documentation":"The historic task variable query used a variable filter with EQUALS_IGNORE_CASE on a value that is not a String; case-insensitive comparison is only defined for string values, so the non-string value's class is reported.","triggerScenarios":"POST /query/historic-tasks with a taskVariables entry using operation 'notEqualsIgnoreCase' and a non-string value (number, boolean, date).","commonSituations":"Unquoted JSON numbers; client reusing ignore-case operator for a numeric exclusion filter; value converted to Integer by the REST variable factory.","solutions":["Use 'notEquals' (case-sensitive, type-aware) for non-string values","Quote the value in JSON so it is a String when ignore-case semantics are truly needed","Ensure the historic variable is stored as a string if case-insensitive comparison is a requirement"],"exampleFix":"// before\n{\"name\":\"state\",\"operation\":\"notEqualsIgnoreCase\",\"value\":42}\n// after\n{\"name\":\"state\",\"operation\":\"notEquals\",\"value\":42}","handlingStrategy":"type-guard","validationCode":"if (!(variable.getValue() instanceof String))\n    throw new IllegalArgumentException(\"notEqualsIgnoreCase requires a String value\");","typeGuard":"boolean isStringFilter(QueryVariable v) { return v.getValue() instanceof String; }","tryCatchPattern":"try { queryTaskVariables(vars); }\ncatch (FlowableIllegalArgumentException e) { /* fall back to notEquals */ }","preventionTips":["Use notEquals for numeric/boolean exclusion filters","Quote JSON string values explicitly","Keep variable types consistent between process and queries"],"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"}