{"record":{"id":"b4674f3ba410ba94","repo":"flowable/flowable-engine","slug":"only-string-variable-values-are-supported-when-ign-b4674f","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-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/task/TaskBaseResource.java","lineNumber":491,"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.processVariableValueEquals(actualValue);\n                } else {\n                    taskQuery.processVariableValueEquals(variable.getName(), actualValue);\n                }\n                break;\n\n            case EQUALS_IGNORE_CASE:\n                if (actualValue instanceof String) {\n                    taskQuery.processVariableValueEqualsIgnoreCase(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.processVariableValueNotEquals(variable.getName(), actualValue);\n                break;\n\n            case NOT_EQUALS_IGNORE_CASE:\n                if (actualValue instanceof String) {\n                    taskQuery.processVariableValueNotEqualsIgnoreCase(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.processVariableValueGreaterThan(variable.getName(), actualValue);\n                break;","sourceCodeStart":473,"sourceCodeEnd":509,"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#L473-L509","documentation":"Flowable's CMMN REST task query only allows case-insensitive equality comparison on process variables whose value is a String. When EQUALS_IGNORE_CASE is requested with a non-String value (e.g. Integer, Boolean), TaskBaseResource.addProcessvariables throws FlowableIllegalArgumentException, appending the value's actual class name to the message.","triggerScenarios":"POST /cmmn-query/tasks with a queryRequest containing a task/processVariables entry whose variableOperation is EQUALS_IGNORE_CASE and whose value deserializes as a non-String (number, boolean, object, array).","commonSituations":"Client sends numeric or boolean variable values with equalsIgnoreCase; JSON body variables typed as numbers/booleans while the REST filter requires strings; migrating queries from non-ignore-case (any type allowed) to ignore-case variants.","solutions":["Send the variable value as a JSON string (e.g. \"42\" not 42) when using EQUALS_IGNORE_CASE","Use plain EQUALS / NOT_EQUALS operations, which accept any variable type","Cast or convert the variable value to a String on the client before querying","Check the actualValue class name in the message to identify the offending type and adjust the payload"],"exampleFix":"// before\n{\"processVariables\":[{\"name\":\"priority\",\"value\":2,\"variableOperation\":\"EQUALS_IGNORE_CASE\"}]}\n// after\n{\"processVariables\":[{\"name\":\"priority\",\"value\":\"2\",\"variableOperation\":\"EQUALS_IGNORE_CASE\"}]}","handlingStrategy":"validation","validationCode":"if (typeof variable.value !== 'string') throw new Error('EQUALS_IGNORE_CASE requires a string value for variable ' + variable.name);\nawait queryTasks({ processVariables: [{ name: variable.name, value: String(variable.value), variableOperation: 'EQUALS_IGNORE_CASE' }] });","typeGuard":"const isString = (v) => typeof v === 'string';","tryCatchPattern":"try { await queryTasks(req); } catch (e) { if (e.message.includes('Only string variable values are supported when ignoring casing')) { req.processVariables = req.processVariables.map(v => ({...v, value: String(v.value)})); return queryTasks(req); } throw e; }","preventionTips":["Always send string values for *_IGNORE_CASE operations","Prefer EQUALS when filtering non-string variables","Validate variable operation/type pairs before calling the REST API"],"tags":["rest","query","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"}