{"record":{"id":"07fc2960f3285897","repo":"flowable/flowable-engine","slug":"only-string-variable-values-are-supported-when-ign-07fc29","errorCode":null,"errorMessage":"Only string variable values are supported when ignoring casing, but was: {valueClassName}","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":419,"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.taskVariableValueEquals(actualValue);\n                } else {\n                    taskQuery.taskVariableValueEquals(variable.getName(), actualValue);\n                }\n                break;\n\n            case EQUALS_IGNORE_CASE:\n                if (actualValue instanceof String) {\n                    taskQuery.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                taskQuery.taskVariableValueNotEquals(variable.getName(), actualValue);\n                break;\n\n            case NOT_EQUALS_IGNORE_CASE:\n                if (actualValue instanceof String) {\n                    taskQuery.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                taskQuery.taskVariableValueGreaterThan(variable.getName(), actualValue);\n                break;","sourceCodeStart":401,"sourceCodeEnd":437,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/runtime/task/TaskBaseResource.java#L401-L437","documentation":"Case-insensitive equality on variables is only implemented for string values in the underlying TaskQuery (taskVariableValueEqualsIgnoreCase). If the resolved variable value is not a String (e.g. Integer, Boolean), TaskBaseResource.addTaskvariables throws this FlowableIllegalArgumentException instead of silently coercing.","triggerScenarios":"POST/GET /runtime/tasks with a filter {\"name\":\"count\",\"operation\":\"equalsIgnoreCase\",\"value\":5} — the value resolves to an Integer, so the instanceof String check fails.","commonSituations":"Querying numeric or boolean variables with equalsIgnoreCase; assuming ignoreCase works generically; clients not serializing the value as a JSON string.","solutions":["Send the value as a JSON string (quote it) if case-insensitive comparison is really intended","Use plain 'equals' for non-string values, which supports all types","Change the variable type stored in the process to a string if case-insensitive search is a requirement"],"exampleFix":"// before\n{\"name\":\"count\",\"operation\":\"equalsIgnoreCase\",\"value\":5}\n// after\n{\"name\":\"count\",\"operation\":\"equals\",\"value\":5}","handlingStrategy":"validation","validationCode":"function validateIgnoreCaseVar(v) {\n  if ((v.operation === 'equalsIgnoreCase') && typeof v.value !== 'string') {\n    throw new Error(`equalsIgnoreCase requires a string value, got ${typeof v.value}`);\n  }\n}","typeGuard":"const isStringValued = (v) => typeof v.value === 'string';","tryCatchPattern":"try {\n  const res = await flowable.queryTasks(body);\n} catch (e) {\n  if (e.message && e.message.includes('ignoring casing')) {\n    // switch to 'equals' for non-string values\n  } else throw e;\n}","preventionTips":["Use ignore-case operators only for string variables","Do not quote numeric values hoping ignore-case will work — use equals instead","Track variable types in a schema map and pick operators accordingly"],"tags":["rest","validation","flowable","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-14T11:17:12.474Z"}