{"record":{"id":"807155063ba912b9","repo":"flowable/flowable-engine","slug":"only-string-variable-values-are-supported-when-ign","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: (.+?)","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/history/caze/HistoricCaseInstanceBaseResource.java","lineNumber":342,"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                    caseInstanceQuery.variableValueEquals(actualValue);\n                } else {\n                    caseInstanceQuery.variableValueEquals(variable.getName(), actualValue);\n                }\n                break;\n\n            case EQUALS_IGNORE_CASE:\n                if (actualValue instanceof String) {\n                    caseInstanceQuery.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                caseInstanceQuery.variableValueNotEquals(variable.getName(), actualValue);\n                break;\n\n            case LIKE:\n                if (actualValue instanceof String) {\n                    caseInstanceQuery.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                    caseInstanceQuery.variableValueLikeIgnoreCase(variable.getName(), (String) actualValue);","sourceCodeStart":324,"sourceCodeEnd":360,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/history/caze/HistoricCaseInstanceBaseResource.java#L324-L360","documentation":"Guard in HistoricCaseInstanceBaseResource.addVariables for the EQUALS_IGNORE_CASE operation: case-insensitive comparison only makes sense for strings, but the supplied variable value is of another type (its class name is included in the message).","triggerScenarios":"POST query with {\"name\":\"x\",\"operation\":\"equalsIgnoreCase\",\"value\":42} — the resolved value is an Integer/Long/Boolean, not a String.","commonSituations":"Client sends a number/boolean and assumes case-insensitive compare works; JSON numbers parsed as integers instead of strings; copy-pasted equalsIgnoreCase for numeric variables.","solutions":["Use operation \"equals\" for non-string values","Quote the value in JSON so it arrives as a String (\"value\":\"42\") if case-insensitive matching is truly intended","Check the variable's actual type and choose the matching operation","Note: boolean values serialized as strings may still fail conversion — prefer equals for them"],"exampleFix":"// before\n{\"name\":\"count\",\"operation\":\"equalsIgnoreCase\",\"value\":5}\n// after\n{\"name\":\"count\",\"operation\":\"equals\",\"value\":5}","handlingStrategy":"type-guard","validationCode":"if (!\"equals\".equals(op) && value != null && !(value instanceof String))\n  throw new IllegalArgumentException(\"equalsIgnoreCase requires a String value\");","typeGuard":"boolean isStringVariableOp(Map<String,Object> v) {\n  return v.get(\"value\") instanceof String || !String.valueOf(v.get(\"operation\")).contains(\"IgnoreCase\");\n}","tryCatchPattern":"try { ... } catch (FlowableIllegalArgumentException e) {\n  return retryWithOperationEquals(request);\n}","preventionTips":["Use equalsIgnoreCase only for string variables","Quote values in JSON to force string type","Inspect variable type via the variables endpoint first"],"tags":["rest-api","validation","type-mismatch","query"],"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"}