{"record":{"id":"51f574b566fb0668","repo":"flowable/flowable-engine","slug":"unsupported-variable-query-operation-operation-51f574","errorCode":null,"errorMessage":"Unsupported variable query operation: ${operation}","messagePattern":"Unsupported variable query operation: (.+?)","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":409,"severity":"error","filePath":"modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/task/TaskBaseResource.java","lineNumber":452,"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":434,"sourceCodeEnd":470,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/task/TaskBaseResource.java#L434-L470","documentation":"This FlowableIllegalArgumentException is the default branch of the variable-operation switch in TaskBaseResource.addTaskvariables. It fires when a task query variable specifies a QueryVariableOperation that the task-query builder does not implement. The REST API only supports a fixed set: equals, notEquals, equalsIgnoreCase, notEqualsIgnoreCase, like, likeIgnoreCase, greaterThan, greaterThanOrEquals, lessThan, lessThanOrEquals, exists, notExists.","triggerScenarios":"POST /cmmn-query/tasks with a taskVariables entry whose operation is an unknown string (e.g. \"contains\", \"in\", \"between\") or a typo such as \"equlas\".","commonSituations":"Copy-pasted query bodies from other Flowable APIs (e.g. process-instance or history queries with different supported operations), typos, newer operations used against an older Flowable version that doesn't recognize them.","solutions":["Check the spelling of the operation field against the supported QueryVariableOperation enum values.","Replace unsupported operators (e.g. \"in\", \"between\") with combinations of supported ones (multiple criteria or range via greaterThan/lessThan).","If an operation exists in newer Flowable docs, upgrade the Flowable version rather than sending it to an older engine."],"exampleFix":"// before\n{\"taskVariables\":[{\"name\":\"status\",\"operation\":\"contains\",\"value\":\"open\"}]}\n// after\n{\"taskVariables\":[{\"name\":\"status\",\"operation\":\"like\",\"value\":\"%open%\"}]}","handlingStrategy":"validation","validationCode":"const SUPPORTED = ['equals','notEquals','equalsIgnoreCase','notEqualsIgnoreCase','like','likeIgnoreCase','greaterThan','greaterThanOrEquals','lessThan','lessThanOrEquals','exists','notExists'];\nfor (const v of body.taskVariables || []) {\n  if (!SUPPORTED.includes(v.operation)) throw new Error('Unsupported operation: ' + v.operation);\n}","typeGuard":"const isSupportedOperation = op => ['equals','notEquals','equalsIgnoreCase','notEqualsIgnoreCase','like','likeIgnoreCase','greaterThan','greaterThanOrEquals','lessThan','lessThanOrEquals','exists','notExists'].includes(op);","tryCatchPattern":"try {\n  // query call\n} catch (e) {\n  if (String(e.message).startsWith('Unsupported variable query operation')) {\n    // correct the operation and retry with a supported operator\n  } else throw e;\n}","preventionTips":["Whitelist operations against the QueryVariableOperation enum","Don't copy query bodies between different Flowable REST endpoints without checking supported operations","Match operation names to your Flowable version's docs"],"tags":["rest-api","query","enum","flowable"],"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"}