{"record":{"id":"ef8d4fffa2f349dd","repo":"flowable/flowable-engine","slug":"only-string-variable-values-are-supported-when-ign-ef8d4f","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: \" \\+ actualValue\\.getClass\\(\\)\\.getName\\(\\)","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-rest/src/main/java/org/flowable/rest/service/api/history/HistoricProcessInstanceBaseResource.java","lineNumber":344,"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                    processInstanceQuery.variableValueEquals(actualValue);\n                } else {\n                    processInstanceQuery.variableValueEquals(variable.getName(), actualValue);\n                }\n                break;\n\n            case EQUALS_IGNORE_CASE:\n                if (actualValue instanceof String) {\n                    processInstanceQuery.variableValueEqualsIgnoreCase(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                processInstanceQuery.variableValueNotEquals(variable.getName(), actualValue);\n                break;\n\n            case LIKE:\n                if (actualValue instanceof String) {\n                    processInstanceQuery.variableValueLike(variable.getName(), (String) actualValue);\n                } else {\n                    throw new FlowableIllegalArgumentException(\"Only string variable values are supported for like, but was: \" + actualValue.getClass().getName());\n                }\n                break;\n\n            case LIKE_IGNORE_CASE:\n                if (actualValue instanceof String) {\n                    processInstanceQuery.variableValueLikeIgnoreCase(variable.getName(), (String) actualValue);","sourceCodeStart":326,"sourceCodeEnd":362,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/history/HistoricProcessInstanceBaseResource.java#L326-L362","documentation":"Flowable's historic process instance query REST API only supports case-insensitive equality on String variables. When the EQUALS_IGNORE_CASE variable operation is requested but the resolved variable value is not a String, addVariables throws FlowableIllegalArgumentException naming the offending Java class.","triggerScenarios":"POST/GET to history process instance query endpoints with a variable entry whose variableOperation is EQUALS_IGNORE_CASE and whose value deserializes to a non-String type (Integer, Boolean, Date, etc.).","commonSituations":"Clients building dynamic query UIs that pass user input typed as numbers; JSON bodies where the value is numeric or boolean but the operation requests case-insensitive comparison; API clients copied from EQUALS examples and only changing the operation.","solutions":["Change variableOperation to EQUALS which accepts any comparable variable type","Send the value as a JSON string (e.g. \"123\" instead of 123) when using EQUALS_IGNORE_CASE","Coerce the value to String on the client before sending the request"],"exampleFix":"// before\n{\"name\":\"orderNr\",\"type\":\"integer\",\"value\":123,\"variableOperation\":\"EQUALS_IGNORE_CASE\"}\n// after\n{\"name\":\"orderNr\",\"value\":\"123\",\"variableOperation\":\"EQUALS_IGNORE_CASE\"}","handlingStrategy":"validation","validationCode":"if (typeof variable.value === 'string') { /* send EQUALS_IGNORE_CASE */ } else { variable.variableOperation = 'EQUALS'; }","typeGuard":"const isString = (v) => typeof v === 'string';","tryCatchPattern":"catch (e) { if (e.response && e.response.status === 400 && /Only string variable values/.test(e.response.data.message)) { /* retry with EQUALS */ } else throw e; }","preventionTips":["Only use *_IGNORE_CASE operations for text variables","Type the request payload so values are strings when case-insensitive ops are used","Validate query builders against the operation-type matrix before sending"],"tags":["rest-api","query-variables","type-mismatch","validation"],"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"}