{"record":{"id":"163f4b99b5885913","repo":"flowable/flowable-engine","slug":"unsupported-variable-query-operation-163f4b","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/runtime/task/TaskBaseResource.java","lineNumber":476,"sourceCode":"\n            case LIKE_IGNORE_CASE:\n                if (actualValue instanceof String) {\n                    taskQuery.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                taskQuery.taskVariableExists(variable.getName());\n                break;\n\n            case NOT_EXISTS:\n                taskQuery.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(TaskQuery taskQuery, 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":458,"sourceCodeEnd":494,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/runtime/task/TaskBaseResource.java#L458-L494","documentation":"The switch over QueryVariableOperation in TaskBaseResource.addTaskvariables has a default branch that throws when the operation string does not map to any known enum constant handler. Practically this means the client supplied an unrecognized/unsupported variable operation name.","triggerScenarios":"POST/GET /runtime/tasks with a taskVariables entry whose 'operation' is misspelled or not a valid QueryVariableOperation value (e.g. 'equal', 'contains'), or a newer operation sent to an older Flowable REST version.","commonSituations":"Typos in operation names; API version mismatch between client docs and server; copying operation names from a different engine (e.g. process-variable-only ops).","solutions":["Use an exact QueryVariableOperation value: equals, notEquals, equalsIgnoreCase, notEqualsIgnoreCase, like, likeIgnoreCase, greaterThan, greaterThanOrEquals, lessThan, lessThanOrEquals, exists, notExists","Check the Flowable version's QueryVariableOperation enum for supported names","Fix typos in the query body"],"exampleFix":"// before\n{\"name\":\"x\",\"operation\":\"contains\",\"value\":\"abc\"}\n// after\n{\"name\":\"x\",\"operation\":\"like\",\"value\":\"%abc%\"}","handlingStrategy":"validation","validationCode":"const OPS = ['equals','notEquals','equalsIgnoreCase','notEqualsIgnoreCase','like','likeIgnoreCase','greaterThan','greaterThanOrEquals','lessThan','lessThanOrEquals','exists','notExists'];\nfunction validateOp(v) {\n  if (!OPS.includes(v.operation)) {\n    throw new Error(`Unsupported variable operation: ${v.operation}`);\n  }\n}","typeGuard":"const isKnownOp = (op) => OPS.includes(op);","tryCatchPattern":"try {\n  const res = await flowable.queryTasks(body);\n} catch (e) {\n  if (e.message && e.message.includes('Unsupported variable query operation')) {\n    // correct the operation name against the server's Flowable version\n  } else throw e;\n}","preventionTips":["Keep an enum of valid operations matching your Flowable version","Watch for version drift: newer operations may not exist on older servers","Use typed clients instead of raw strings for the operation field"],"tags":["rest","validation","flowable","enum"],"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-18T11:17:12.947Z"}