{"record":{"id":"ad40e5c5e81b7ad4","repo":"flowable/flowable-engine","slug":"unsupported-variable-query-operation-operation-ad40e5","errorCode":null,"errorMessage":"Unsupported variable query operation: ${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/runtime/variable/VariableInstanceBaseResource.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/runtime/variable/VariableInstanceBaseResource.java#L123-L146","documentation":"FlowableIllegalArgumentException thrown when a QueryVariable in the variable-instance query request uses an operation the implementation does not handle. In this CMMN REST module only EQUALS is wired into the switch; any other operator name (GREATER_THAN, LIKE, NEQUALS, ...) reaches the default branch.","triggerScenarios":"POST /cmmn-query/variable-instances with a variables[] entry whose 'operation' is any value other than EQUALS.","commonSituations":"Clients ported from the process (BPMN) REST API that supports more operators; assuming parity of supported operators across engine REST modules.","solutions":["Use operation EQUALS for each variable filter in the CMMN variable-instance query","Filter additional conditions client-side on the returned results","Check the module source/API docs for the supported operator list before upgrading query code"],"exampleFix":"// before\n{\"variables\":[{\"name\":\"count\",\"value\":5,\"operation\":\"GREATER_THAN\"}]}\n// after\n{\"variables\":[{\"name\":\"count\",\"value\":5,\"operation\":\"EQUALS\"}]}","handlingStrategy":"validation","validationCode":"const SUPPORTED = ['EQUALS']; const ok = q.variables.every(v => SUPPORTED.includes(v.operation));","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Restrict CMMN variable-instance query filters to operation EQUALS","Do not assume operator parity with the BPMN process variable query API","Check the switch in VariableInstanceBaseResource when upgrading versions"],"tags":["rest-api","query","unsupported-operation"],"backgroundTag":"unsupported-operation","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"}