{"record":{"id":"45d81147945b1294","repo":"flowable/flowable-engine","slug":"unsupported-variable-query-operation-45d811","errorCode":null,"errorMessage":"Unsupported variable query operation: ","messagePattern":"Unsupported variable query operation: ","errorType":"http","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-rest/src/main/java/org/flowable/rest/service/api/history/HistoricTaskInstanceBaseResource.java","lineNumber":428,"sourceCode":"\n            case LIKE_IGNORE_CASE:\n                if (actualValue instanceof String) {\n                    taskInstanceQuery.taskVariableValueLikeIgnoreCase(variable.getName(), (String) actualValue);\n                } else {\n                    throw new FlowableIllegalArgumentException(\"Only string variable values are supported using like, but was: \" + actualValue.getClass().getName());\n                }\n                break;\n\n            case EXISTS:\n                taskInstanceQuery.taskVariableExists(variable.getName());\n                break;\n\n            case NOT_EXISTS:\n                taskInstanceQuery.taskVariableNotExists(variable.getName());\n                break;\n\n            default:\n                throw new FlowableIllegalArgumentException(\"Unsupported variable query operation: \" + variable.getVariableOperation());\n            }\n        }\n    }\n\n    protected void addProcessVariables(HistoricTaskInstanceQuery taskInstanceQuery, List<QueryVariable> variables) {\n        for (QueryVariable variable : variables) {\n            if (variable.getVariableOperation() == null) {\n                throw new FlowableIllegalArgumentException(\"Variable operation is missing for variable: \" + variable.getName());\n            }\n            if (variable.getVariableOperation() != QueryVariableOperation.EXISTS && variable.getVariableOperation() != QueryVariableOperation.NOT_EXISTS) {\n                if (variable.getValue() == null) {\n                    throw new FlowableIllegalArgumentException(\"Variable value is missing for variable: \" + variable.getName());\n                }\n            }\n\n            boolean nameLess = variable.getName() == null;\n\n            Object actualValue = restResponseFactory.getVariableValue(variable);","sourceCodeStart":410,"sourceCodeEnd":446,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/history/HistoricTaskInstanceBaseResource.java#L410-L446","documentation":"Thrown by addTaskVariables in HistoricTaskInstanceBaseResource when a task variable query predicate uses a QueryVariableOperation that the historic task instance query cannot map to a taskVariable* method. The switch only handles EQUALS, NOT_EQUALS, EQUALS_IGNORE_CASE, NOT_EQUALS_IGNORE_CASE, LIKE, LIKE_IGNORE_CASE, GREATER_THAN(_OR_EQUALS), LESS_THAN(_OR_EQUALS), EXISTS and NOT_EXISTS; anything else hits the default branch. This means the REST request supplied an operation value outside the supported set.","triggerScenarios":"Calling GET /history/historic-task-instances?taskVariable=op=<operation><name><value> (or POST variant) with an unsupported operation string for a task-scope variable. For example a typo like 'eq' or an operation valid in another endpoint but not in the query-variables mapper.","commonSituations":"Hand-built query strings with mistyped operation tokens; client code copied from process-variable endpoints; upgrading clients sending new operations an older Flowable REST layer does not recognize.","solutions":["Use one of the supported operations: equals, notEquals, equalsIgnoreCase, notEqualsIgnoreCase, like, likeIgnoreCase, greaterThan, greaterThanOrEquals, lessThan, lessThanOrEquals, exists, notExists.","Check spelling/casing of the variable op in the query string; the value must deserialize into QueryVariableOperation.","If a genuinely new operation is needed, upgrade Flowable to a version whose addTaskVariables supports it."],"exampleFix":"// before\nGET /flowable-rest/history/historic-task-instances?taskVariable=eq==status/active\n// after\nGET /flowable-rest/history/historic-task-instances?taskVariable=equals==status/active","handlingStrategy":"validation","validationCode":"const OPS = ['equals','notEquals','equalsIgnoreCase','notEqualsIgnoreCase','like','likeIgnoreCase','greaterThan','greaterThanOrEquals','lessThan','lessThanOrEquals','exists','notExists'];\nif (!OPS.includes(q.taskVariableOp)) throw new Error('Unsupported task variable op: ' + q.taskVariableOp);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Centralize the allowed variable-operation list in your client","Never hand-concatenate variable query parameters without an op whitelist"],"tags":["rest-api","query-variable","invalid-operation","history-query"],"backgroundTag":"invalid-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"}