{"record":{"id":"e40a384a2d961c26","repo":"flowable/flowable-engine","slug":"unsupported-variable-query-operation-variable","errorCode":null,"errorMessage":"Unsupported variable query operation: \" + variable.getVariableOperation()","messagePattern":"Unsupported variable query operation: \" \\+ variable\\.getVariableOperation\\(\\)","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-rest/src/main/java/org/flowable/rest/service/api/history/HistoricProcessInstanceBaseResource.java","lineNumber":394,"sourceCode":"\n            case LESS_THAN:\n                processInstanceQuery.variableValueLessThan(variable.getName(), actualValue);\n                break;\n\n            case LESS_THAN_OR_EQUALS:\n                processInstanceQuery.variableValueLessThanOrEqual(variable.getName(), actualValue);\n                break;\n\n            case EXISTS:\n                processInstanceQuery.variableExists(variable.getName());\n                break;\n\n            case NOT_EXISTS:\n                processInstanceQuery.variableNotExists(variable.getName());\n                break;\n\n            default:\n                throw new FlowableIllegalArgumentException(\"Unsupported variable query operation: \" + variable.getVariableOperation());\n            }\n        }\n    }\n}\n","sourceCodeStart":376,"sourceCodeEnd":399,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/history/HistoricProcessInstanceBaseResource.java#L376-L399","documentation":"The addVariables switch handles the full set of supported VariableQueryOperand values; an unrecognized or unimplemented variableOperation falls into the default branch and throws FlowableIllegalArgumentException. This protects the query API from silently ignoring malformed operations.","triggerScenarios":"Sending a variable query entry whose variableOperation is null, misspelled, or an enum value not supported for historic process instance queries (e.g. an operation only valid elsewhere in the API).","commonSituations":"Typos in variableOperation strings in hand-written JSON; clients written against a different Flowable REST version with additional operations; deserialization producing an unexpected enum/null value.","solutions":["Use one of the supported operations: EQUALS, NOT_EQUALS, EQUALS_IGNORE_CASE, NOT_EQUALS_IGNORE_CASE, LIKE, LIKE_IGNORE_CASE, GREATER_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN, LESS_THAN_OR_EQUAL, EXISTS, NOT_EXISTS","Check for typos and exact casing of variableOperation in the request JSON","Verify the client's targeted Flowable REST version supports the operation being sent"],"exampleFix":"// before\n{\"name\":\"status\",\"value\":\"open\",\"variableOperation\":\"equal\"}\n// after\n{\"name\":\"status\",\"value\":\"open\",\"variableOperation\":\"EQUALS\"}","handlingStrategy":"validation","validationCode":"const OPS = ['EQUALS','NOT_EQUALS','EQUALS_IGNORE_CASE','NOT_EQUALS_IGNORE_CASE','LIKE','LIKE_IGNORE_CASE','GREATER_THAN','GREATER_THAN_OR_EQUAL','LESS_THAN','LESS_THAN_OR_EQUAL','EXISTS','NOT_EXISTS']; if (!OPS.includes(variable.variableOperation)) throw new Error('Unsupported operation: ' + variable.variableOperation);","typeGuard":"const isValidOp = (op) => OPS.includes(op);","tryCatchPattern":"catch (e) { if (e.response && e.response.status === 400 && /Unsupported variable query operation/.test(e.response.data.message)) { /* fix operation and retry */ } throw e; }","preventionTips":["Centralize the enum of valid operations in the client","Never send null variableOperation unless using EXISTS/NOT_EXISTS which ignore value","Pin client SDK to the server's Flowable version"],"tags":["rest-api","query-variables","invalid-enum-value","validation"],"backgroundTag":"unsupported-enum-value","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"}