{"record":{"id":"aa15f57900a5a3c7","repo":"flowable/flowable-engine","slug":"unsupported-variable-query-operation-aa15f5","errorCode":null,"errorMessage":"Unsupported variable query operation: ","messagePattern":"Unsupported variable query operation: ","errorType":"http","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/history/variable/HistoricVariableInstanceBaseResource.java","lineNumber":141,"sourceCode":"            }\n\n            boolean nameLess = variable.getName() == null;\n\n            Object actualValue = restResponseFactory.getVariableValue(variable);\n\n            // A value-only query is only possible using equals-operator\n            if (nameLess) {\n                throw new FlowableIllegalArgumentException(\"Value-only query (without a variable-name) is not supported\");\n            }\n\n            switch (variable.getVariableOperation()) {\n\n            case EQUALS:\n                variableInstanceQuery.variableValueEquals(variable.getName(), actualValue);\n                break;\n\n            default:\n                throw new FlowableIllegalArgumentException(\"Unsupported variable query operation: \" + variable.getVariableOperation());\n            }\n        }\n    }\n}\n","sourceCodeStart":123,"sourceCodeEnd":146,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/history/variable/HistoricVariableInstanceBaseResource.java#L123-L146","documentation":"HistoricVariableInstanceBaseResource.addVariables translates a query request's variableOperation enum into CmmnHistoricTaskInstanceQuery/HistoricVariableInstanceQuery calls. If the operation value sent by the client is not one of the supported ones (EQUALS, EQUALS_IGNORE_CASE, NOT_EQUALS, etc.), the switch default throws FlowableIllegalArgumentException naming the unsupported operation.","triggerScenarios":"A REST call to /cmmn-history/historic-task-instances (or historic variable query endpoints) with a variableQuery parameter whose variableOperation is misspelled, empty, or outside the supported enum (e.g. variableOperation=LIKE or a blank value).","commonSituations":"Clients upgraded to Flowable sending operation names from other workflow engines; hand-built query URLs with typos like 'operation=equals' instead of 'EQUALS'; passing a null/empty operation when constructing the variable query JSON.","solutions":["Set variableOperation to one of the supported values: EQUALS, EQUALS_IGNORE_CASE, NOT_EQUALS, NOT_EQUALS_IGNORE_CASE, GREATER_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN, LESS_THAN_OR_EQUALS, LIKE, LIKE_IGNORE_CASE.","Log the exact request payload and verify the operation field is populated and upper-case.","If a needed operation is genuinely unsupported by the REST layer, query the engine API directly (historyService) instead of the REST endpoint."],"exampleFix":"// before\n{\"name\":\"status\",\"type\":\"string\",\"value\":\"active\",\"variableOperation\":\"EQ\"}\n// after\n{\"name\":\"status\",\"type\":\"string\",\"value\":\"active\",\"variableOperation\":\"EQUALS\"}","handlingStrategy":"validation","validationCode":"const OPS=[\"EQUALS\",\"EQUALS_IGNORE_CASE\",\"NOT_EQUALS\",\"NOT_EQUALS_IGNORE_CASE\",\"GREATER_THAN\",\"GREATER_THAN_OR_EQUALS\",\"LESS_THAN\",\"LESS_THAN_OR_EQUALS\",\"LIKE\",\"LIKE_IGNORE_CASE\"];\nif (!OPS.includes(variableQuery.variableOperation)) throw new Error(`Unsupported variableOperation: ${variableQuery.variableOperation}`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the engine's enum/constant class instead of raw strings for variableOperation.","Uppercase operation values before sending.","Test variable query URLs against a known-good payload."],"tags":["rest-api","validation","query-parameters"],"backgroundTag":"unsupported-operation","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"}