{"record":{"id":"644eabc2f529811d","repo":"flowable/flowable-engine","slug":"only-string-values-can-be-used-with-not-equals-ig","errorCode":null,"errorMessage":"Only string values can be used with 'not equals ignore case' condition","messagePattern":"Only string values can be used with 'not equals ignore case' condition","errorType":"validation","errorClass":"org.flowable.common.engine.api.FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-variable-service/src/main/java/org/flowable/variable/service/impl/AbstractVariableQueryImpl.java","lineNumber":323,"sourceCode":"            switch (operator) {\n                case GREATER_THAN:\n                    throw new FlowableIllegalArgumentException(\"Booleans and null cannot be used in 'greater than' condition\");\n                case LESS_THAN:\n                    throw new FlowableIllegalArgumentException(\"Booleans and null cannot be used in 'less than' condition\");\n                case GREATER_THAN_OR_EQUAL:\n                    throw new FlowableIllegalArgumentException(\"Booleans and null cannot be used in 'greater than or equal' condition\");\n                case LESS_THAN_OR_EQUAL:\n                    throw new FlowableIllegalArgumentException(\"Booleans and null cannot be used in 'less than or equal' condition\");\n                default:\n                    break;\n            }\n\n            if (operator == QueryOperator.EQUALS_IGNORE_CASE && !(value instanceof String)) {\n                throw new FlowableIllegalArgumentException(\"Only string values can be used with 'equals ignore case' condition\");\n            }\n\n            if (operator == QueryOperator.NOT_EQUALS_IGNORE_CASE && !(value instanceof String)) {\n                throw new FlowableIllegalArgumentException(\"Only string values can be used with 'not equals ignore case' condition\");\n            }\n\n            if ((operator == QueryOperator.LIKE || operator == QueryOperator.LIKE_IGNORE_CASE) && !(value instanceof String)) {\n                throw new FlowableIllegalArgumentException(\"Only string values can be used with 'like' condition\");\n            }\n        }\n\n        queryVariableValues.add(new QueryVariableValue(name, value, operator, localScope, scopeType));\n    }\n\n    protected boolean isBoolean(Object value) {\n        if (value == null) {\n            return false;\n        }\n        return Boolean.class.isAssignableFrom(value.getClass()) || boolean.class.isAssignableFrom(value.getClass());\n    }\n\n    protected void ensureVariablesInitialized() {","sourceCodeStart":305,"sourceCodeEnd":341,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-variable-service/src/main/java/org/flowable/variable/service/impl/AbstractVariableQueryImpl.java#L305-L341","documentation":"NOT_EQUALS_IGNORE_CASE in Flowable variable queries requires a String value; any other type triggers this FlowableIllegalArgumentException in AbstractVariableQueryImpl.addVariable. The operator compiles to a case-insensitive SQL inequality, which is only defined for text variables. It is thrown immediately when the clause is added.","triggerScenarios":"Calling variableValueNotEqualsIgnoreCase (or scoped variants) with a non-String value such as Integer, Long, Boolean or null.","commonSituations":"Swapping notEquals for notEqualsIgnoreCase without changing the value type; enum/number variables queried with case-insensitive intent; generic filters applying ignore-case to all variables.","solutions":["Pass a String value, converting if appropriate (String.valueOf)","Use variableValueNotEquals for non-string types","Check value instanceof String before calling the ignore-case variant","Store the variable as a string if case-insensitive matching is required"],"exampleFix":"// before\nq.variableValueNotEqualsIgnoreCase(\"status\", 42);\n// after\nq.variableValueNotEqualsIgnoreCase(\"status\", \"42\"); // or variableValueNotEquals for numbers","handlingStrategy":"type-guard","validationCode":"if (!(value instanceof String)) {\n    throw new IllegalArgumentException(\"notEqualsIgnoreCase requires a String value\");\n}\nquery.variableValueNotEqualsIgnoreCase(name, (String) value);","typeGuard":"static boolean isText(Object v) {\n    return v instanceof String;\n}","tryCatchPattern":"try {\n    query.variableValueNotEqualsIgnoreCase(name, value);\n} catch (org.flowable.common.engine.api.FlowableIllegalArgumentException e) {\n    query.variableValueNotEquals(name, value);\n}","preventionTips":["Use ignore-case operators only for text variables","Cast/convert to String deliberately, not implicitly","Keep case-insensitive logic centralized in one helper","Review generic query builders for type assumptions"],"tags":["flowable","validation","string","query"],"backgroundTag":"invalid-argument-value","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"}