{"record":{"id":"e62c5d5e0483ba0d","repo":"flowable/flowable-engine","slug":"unsupported-variable-query-operation-variable-g","errorCode":null,"errorMessage":"Unsupported variable query operation: ${variable.getVariableOperation()}","messagePattern":"Unsupported variable query operation: (.+?)","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/history/caze/HistoricCaseInstanceBaseResource.java","lineNumber":392,"sourceCode":"\n            case LESS_THAN:\n                caseInstanceQuery.variableValueLessThan(variable.getName(), actualValue);\n                break;\n\n            case LESS_THAN_OR_EQUALS:\n                caseInstanceQuery.variableValueLessThanOrEqual(variable.getName(), actualValue);\n                break;\n\n            case EXISTS:\n                caseInstanceQuery.variableExists(variable.getName());\n                break;\n\n            case NOT_EXISTS:\n                caseInstanceQuery.variableNotExists(variable.getName());\n                break;\n\n            default:\n                throw new FlowableIllegalArgumentException(\"Unsupported variable query operation: \" + variable.getVariableOperation());\n            }\n        }\n    }\n}\n","sourceCodeStart":374,"sourceCodeEnd":397,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/history/caze/HistoricCaseInstanceBaseResource.java#L374-L397","documentation":"Catch-all FlowableIllegalArgumentException in the operation switch: the requested QueryVariableOperation has no branch in the historic case instance variable query builder, so it is unsupported for this endpoint.","triggerScenarios":"POST query with an operation value that deserializes to an enum the switch does not handle (newer/older enum member, or a custom operation name).","commonSituations":"Client and server version mismatch — client sends an operation added in a newer Flowable version; typos that still deserialize; copy-pasted operation from a task/process query supporting more operations.","solutions":["Use a supported operation: equals, notEquals, equalsIgnoreCase, notEqualsIgnoreCase, like, likeIgnoreCase, greaterThan, greaterThanOrEquals, lessThan, lessThanOrEquals, exists, notExists","Align client Flowable REST version with the server version","Log and inspect the exact operation string being sent","Add server-side handling if you own a fork and need the extra operation"],"exampleFix":"// before\n{\"name\":\"x\",\"operation\":\"between\",\"value\":1}\n// after\n{\"name\":\"x\",\"operation\":\"greaterThanOrEquals\",\"value\":1} // plus a lessThanOrEquals variable","handlingStrategy":"validation","validationCode":"Set<String> SUPPORTED = Set.of(\"equals\",\"notEquals\",\"equalsIgnoreCase\",\"notEqualsIgnoreCase\",\"like\",\"likeIgnoreCase\",\"greaterThan\",\"greaterThanOrEquals\",\"lessThan\",\"lessThanOrEquals\",\"exists\",\"notExists\");\nif (!SUPPORTED.contains(op)) throw new IllegalArgumentException(\"Unsupported operation: \" + op);","typeGuard":"boolean isSupportedOperation(String op) {\n  return java.util.EnumSet.allOf(QueryVariableOperation.class).stream()\n    .map(Enum::name).map(n -> n.replace('_',' ').toLowerCase()).anyMatch(op::equals);\n}","tryCatchPattern":"try { ... } catch (FlowableIllegalArgumentException e) {\n  log.error(\"Unsupported variable operation: {}\", e.getMessage());\n  return badRequest(e.getMessage());\n}","preventionTips":["Pin client and server Flowable versions together","Use only operations listed in the endpoint docs","Integration-test queries after version upgrades"],"tags":["rest-api","query","unsupported-operation","version-mismatch"],"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-14T05:17:10.506Z"}