{"record":{"id":"ee290230e0f6956d","repo":"flowable/flowable-engine","slug":"unsupported-variable-query-operation-variable-ee2902","errorCode":null,"errorMessage":"Unsupported variable query operation: \" + variable.getVariableOperation()","messagePattern":"Unsupported variable query operation: \" \\+ variable\\.getVariableOperation\\(\\)","errorType":"http","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-rest/src/main/java/org/flowable/rest/service/api/runtime/process/BaseProcessInstanceResource.java","lineNumber":369,"sourceCode":"\n            case LESS_THAN:\n                processInstanceQuery.variableValueLessThan(variable.getName(), actualValue);\n                break;\n\n            case LESS_THAN_OR_EQUALS:\n                processInstanceQuery.variableValueLessThanOrEqual(variable.getName(), actualValue);\n                break;\n\n            case EXISTS:\n                processInstanceQuery.variableExists(variable.getName());\n                break;\n\n            case NOT_EXISTS:\n                processInstanceQuery.variableNotExists(variable.getName());\n                break;\n\n            default:\n                throw new FlowableIllegalArgumentException(\"Unsupported variable query operation: \" + variable.getVariableOperation());\n            }\n        }\n    }\n\n    /**\n     * Returns the {@link ProcessInstance} that is requested and calls the access interceptor.\n     * Throws the right exceptions when bad request was made or instance was not found.\n     */\n    protected ProcessInstance getProcessInstanceFromRequest(String processInstanceId) {\n        ProcessInstance processInstance = getProcessInstanceFromRequestWithoutAccessCheck(processInstanceId);\n\n        if (restApiInterceptor != null) {\n            restApiInterceptor.accessProcessInstanceInfoById(processInstance);\n        }\n\n        return processInstance;\n    }\n","sourceCodeStart":351,"sourceCodeEnd":387,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/runtime/process/BaseProcessInstanceResource.java#L351-L387","documentation":"addVariables throws this FlowableIllegalArgumentException when the request's variable query filter specifies a variableOperation value that does not match any supported enum case (EQUALS, NOT_EQUALS, EQUALS_IGNORE_CASE, LIKE, GREATER_THAN, etc.). The default branch of the switch is the guard against unknown/misspelled operations.","triggerScenarios":"Sending a variableQuery with an operation string that is not part of the VariableQueryOperation enum, e.g. \"equal\", \"contains\", \"\", or a typo like \"euals\"; calling the endpoint after a Flowable upgrade that renamed an operation.","commonSituations":"Hand-written query strings with wrong casing (\"equalsignorecase\"); client code built against a different Flowable version; generic UIs letting users type arbitrary operation names.","solutions":["Use an exact, supported operation name: EQUALS, NOT_EQUALS, EQUALS_IGNORE_CASE, NOT_EQUALS_IGNORE_CASE, LIKE, LIKE_IGNORE_CASE, GREATER_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN, LESS_THAN_OR_EQUAL, EXISTS, NOT_EXISTS","Check the VariableQueryOperation enum in your Flowable version and align the client","Log the failing request body to identify the malformed operation value"],"exampleFix":"// before\n{\"name\":\"status\",\"operation\":\"contains\",\"value\":\"run\"}\n// after\n{\"name\":\"status\",\"operation\":\"like\",\"value\":\"%run%\"}","handlingStrategy":"validation","validationCode":"const ALLOWED = ['EQUALS','NOT_EQUALS','EQUALS_IGNORE_CASE','NOT_EQUALS_IGNORE_CASE','LIKE','LIKE_IGNORE_CASE','GREATER_THAN','GREATER_THAN_OR_EQUAL','LESS_THAN','LESS_THAN_OR_EQUAL','EXISTS','NOT_EXISTS']; if (!ALLOWED.includes(operation)) throw new Error('Unsupported variableOperation: ' + operation);","typeGuard":"function isValidOperation(op, allowed) { return allowed.includes(op); }","tryCatchPattern":"try { await query(body); } catch (e) { if (e.message.startsWith('Unsupported variable query operation')) { console.error('Bad operation:', body.variable.variableOperation); } }","preventionTips":["Copy operation names exactly from the VariableQueryOperation enum in your Flowable version","Pin the Flowable version and regenerate clients after upgrades","Use an enum type in your client code instead of free-form strings"],"tags":["flowable","rest-api","query","invalid-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"}