{"record":{"id":"3692fcd1c45bb864","repo":"flowable/flowable-engine","slug":"only-string-variable-values-are-supported-when-ign-3692fc","errorCode":null,"errorMessage":"Only string variable values are supported when ignoring casing, but was: ${type}","messagePattern":"Only string variable values are supported when ignoring casing, but was: (.+?)","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":409,"severity":"error","filePath":"modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/task/TaskBaseResource.java","lineNumber":395,"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":377,"sourceCodeEnd":413,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/task/TaskBaseResource.java#L377-L413","documentation":"The equalsIgnoreCase variable operation is only defined for string values, since case-insensitive comparison requires a textual value. Flowable throws FlowableIllegalArgumentException when the deserialized variable value is not a java.lang.String. Raised in TaskBaseResource.addTaskvariables when handling the EQUALS_IGNORE_CASE case of the switch.","triggerScenarios":"POST /cmmn-query/tasks with {\"taskVariables\":[{\"name\":\"level\",\"operation\":\"equalsIgnoreCase\",\"value\":3}]} — any non-string JSON value (number, boolean, array, object) with operation equalsIgnoreCase.","commonSituations":"Passing numeric or boolean variables to case-insensitive filters, JSON clients that send unquoted numbers where a string was intended, generic search UIs that apply 'ignore case' to every filter.","solutions":["Send the value as a JSON string, e.g. \"value\":\"3\" instead of \"value\":3.","Use the plain equals operation for non-string values.","Coerce the value to a string on the client before building the query."],"exampleFix":"// before\n{\"name\":\"level\",\"operation\":\"equalsIgnoreCase\",\"value\":3}\n// after\n{\"name\":\"level\",\"operation\":\"equalsIgnoreCase\",\"value\":\"three\"}","handlingStrategy":"validation","validationCode":"for (const v of body.taskVariables || []) {\n  if (v.operation === 'equalsIgnoreCase' && typeof v.value !== 'string') {\n    throw new Error('equalsIgnoreCase requires a string value for variable ' + v.name);\n  }\n}","typeGuard":"const isStringValued = v => typeof v.value === 'string';","tryCatchPattern":null,"preventionTips":["Reserve *IgnoreCase operations for string variables","Quote values in JSON so numbers stay strings","Coerce values with String(value) when ignore-case filtering is intended"],"tags":["rest-api","query","type-mismatch","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-18T11:17:12.947Z"}