{"record":{"id":"afe72f49edee5f41","repo":"flowable/flowable-engine","slug":"only-string-variable-values-are-supported-when-ign-afe72f","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/planitem/PlanItemInstanceBaseResource.java","lineNumber":192,"sourceCode":"                    }\n                } else {\n                    if (isCase) {\n                        planItemInstanceQuery.caseVariableValueEquals(variable.getName(), actualValue);\n                    } else {\n                        planItemInstanceQuery.variableValueEquals(variable.getName(), actualValue);\n                    }\n                }\n                break;\n\n            case EQUALS_IGNORE_CASE:\n                if (actualValue instanceof String) {\n                    if (isCase) {\n                        planItemInstanceQuery.caseVariableValueEqualsIgnoreCase(variable.getName(), (String) actualValue);\n                    } else {\n                        planItemInstanceQuery.variableValueEqualsIgnoreCase(variable.getName(), (String) actualValue);\n                    }\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                if (isCase) {\n                    planItemInstanceQuery.caseVariableValueNotEquals(variable.getName(), actualValue);\n                } else {\n                    planItemInstanceQuery.variableValueNotEquals(variable.getName(), actualValue);\n                }\n                break;\n\n            case NOT_EQUALS_IGNORE_CASE:\n                if (actualValue instanceof String) {\n                    if (isCase) {\n                        planItemInstanceQuery.caseVariableValueNotEqualsIgnoreCase(variable.getName(), (String) actualValue);\n                    } else {\n                        planItemInstanceQuery.variableValueNotEqualsIgnoreCase(variable.getName(), (String) actualValue);\n                    }","sourceCodeStart":174,"sourceCodeEnd":210,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/planitem/PlanItemInstanceBaseResource.java#L174-L210","documentation":"The EQUALS_IGNORECASE query operation can only be implemented for String values; Flowable cannot case-insensitively compare other variable types. If the REST payload's value is converted to a non-String type (number, boolean, date, ...) while using equalsIgnoreCase, addVariables throws FlowableIllegalArgumentException with the actual Java class name.","triggerScenarios":"Plan-item-instance query with variableOperation 'equalsIgnoreCase' (or in the NOT_EQUALS branch: 'notEqualsIgnoreCase') and a variable value that the RestResponseFactory converts to a non-String object, e.g. value=123 (Integer) or true (Boolean).","commonSituations":"Querying a boolean/numeric variable and using ignore-case to 'be safe'; API clients sending JSON numbers where the persisted variable is expected to be a string.","solutions":["Use plain 'equals' for non-string variable values.","Quote the value in the request so it is treated as a String (e.g. \"123\" instead of 123).","Check the actual variable type stored in the engine and match the query operation accordingly.","Catch FlowableIllegalArgumentException (HTTP 400) and log the class name reported in the message."],"exampleFix":"// before\n{\"name\":\"priority\",\"variableOperation\":\"equalsIgnoreCase\",\"value\":5}\n// after\n{\"name\":\"priority\",\"variableOperation\":\"equals\",\"value\":5}","handlingStrategy":"validation","validationCode":"if (op === 'equalsIgnoreCase' && typeof value !== 'string') throw new Error('equalsIgnoreCase requires a string value');","typeGuard":"const canIgnoreCase = (f) => typeof f.value === 'string';","tryCatchPattern":"try { await query(body); } catch (e) { if (e.status === 400 && /ignoring casing/.test(e.message)) { /* switch to plain equals */ } else { throw e; } }","preventionTips":["Use ignore-case operations only for string variables","Quote numeric-looking string values in JSON","Check the variable type stored in the engine before querying"],"tags":["rest-api","type-mismatch","query-parameters"],"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"}