{"record":{"id":"a941b46c43a3cc4b","repo":"flowable/flowable-engine","slug":"unsupported-variable-query-operation","errorCode":null,"errorMessage":"Unsupported variable query operation: ","messagePattern":"Unsupported variable query operation: ","errorType":"http","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/history/task/HistoricTaskInstanceBaseResource.java","lineNumber":409,"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":391,"sourceCodeEnd":427,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/history/task/HistoricTaskInstanceBaseResource.java#L391-L427","documentation":"The default branch of the variable-operation switch in HistoricTaskInstanceBaseResource.addTaskVariables rejects any QueryVariableOperation that is not one of the explicitly handled cases (EQUALS, NOT_EQUALS, IGNORE_CASE variants, LIKE variants, GREATER_THAN, etc.). An unknown or out-of-range operation value cannot be mapped to a taskInstanceQuery method, so FlowableIllegalArgumentException is thrown.","triggerScenarios":"GET /cmmn-history/historic-task-instances with a task variable filter whose variableOperation does not match any known QueryVariableOperation enum value (e.g. a typo like 'EQUALSS' or an operation from a newer Flowable version not present in this release).","commonSituations":"Client SDKs out of sync with server version; hand-written query strings with misspelled operations; copy-pasted operations from task-runtime endpoints not supported by this historic-query handler.","solutions":["Fix the variableOperation value to one of the supported enum names (EQUALS, NOT_EQUALS, EQUALS_IGNORE_CASE, NOT_EQUALS_IGNORE_CASE, LIKE, LIKE_IGNORE_CASE, GREATER_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN, LESS_THAN_OR_EQUALS, EXISTS, NOT_EXISTS).","Align client library version with the Flowable server version.","Validate the operation client-side against the enum before sending the request.","Catch FlowableIllegalArgumentException and log the offending operation for diagnosis."],"exampleFix":"// before\n{\"name\": \"status\", \"value\": \"open\", \"variableOperation\": \"CONTAINS\"}\n// after\n{\"name\": \"status\", \"value\": \"open\", \"variableOperation\": \"EQUALS\"}","handlingStrategy":"validation","validationCode":"Set<String> allowed = Set.of(\"EQUALS\",\"NOT_EQUALS\",\"EQUALS_IGNORE_CASE\",\"NOT_EQUALS_IGNORE_CASE\",\"LIKE\",\"LIKE_IGNORE_CASE\",\"GREATER_THAN\",\"GREATER_THAN_OR_EQUALS\",\"LESS_THAN\",\"LESS_THAN_OR_EQUALS\",\"EXISTS\",\"NOT_EXISTS\");\nif (!allowed.contains(variableOperation)) throw new IllegalArgumentException(\"Unsupported variableOperation: \" + variableOperation);","typeGuard":null,"tryCatchPattern":"try { return queryTasks(variableFilters); } catch (FlowableIllegalArgumentException e) { if (e.getMessage().startsWith(\"Unsupported variable query operation\")) { /* fix enum in client config */ } throw e; }","preventionTips":["Generate filter operations from the QueryVariableOperation enum, not free-form strings.","Keep client Flowable version aligned with the server.","Add an enum-validated DTO for query variables."],"tags":["rest-api","query","variables","enum","unsupported-operation"],"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"}