{"record":{"id":"7b9b0be8a2782c3b","repo":"flowable/flowable-engine","slug":"value-only-query-without-a-variable-name-is-not-7b9b0b","errorCode":null,"errorMessage":"Value-only query (without a variable-name) is not supported","messagePattern":"Value-only query \\(without a variable-name\\) is not supported","errorType":"http","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-rest/src/main/java/org/flowable/rest/service/api/history/HistoricVariableInstanceBaseResource.java","lineNumber":114,"sourceCode":"                restResponseFactory::createHistoricVariableInstanceResponseList);\n    }\n\n    protected void addVariables(HistoricVariableInstanceQuery variableInstanceQuery, 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.getValue() == null) {\n                throw new FlowableIllegalArgumentException(\"Variable value is missing for variable: \" + variable.getName());\n            }\n\n            boolean nameLess = variable.getName() == null;\n\n            Object actualValue = restResponseFactory.getVariableValue(variable);\n\n            // A value-only query is only possible using equals-operator\n            if (nameLess) {\n                throw new FlowableIllegalArgumentException(\"Value-only query (without a variable-name) is not supported\");\n            }\n\n            switch (variable.getVariableOperation()) {\n\n            case EQUALS:\n                variableInstanceQuery.variableValueEquals(variable.getName(), actualValue);\n                break;\n\n            default:\n                throw new FlowableIllegalArgumentException(\"Unsupported variable query operation: \" + variable.getVariableOperation());\n            }\n        }\n    }\n}\n","sourceCodeStart":96,"sourceCodeEnd":129,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/history/HistoricVariableInstanceBaseResource.java#L96-L129","documentation":"FlowableIllegalArgumentException thrown when a QueryVariable has a null name (a value-only clause). In this Flowable REST version, value-only matching against any variable is not supported for historic variable instance queries — every clause must name a variable, and only the EQUALS operation is implemented for named clauses here.","triggerScenarios":"GET/POST /history/historic-variable-instances with variables=[{\"value\":\"42\",\"operation\":\"EQUALS\"}] (name omitted) — the code sets nameLess=true and rejects the request before the switch statement.","commonSituations":"Clients porting from APIs that support value-only search ('find any variable equal to X'); generic search UIs that build filters with an optional name field; copy-pasted JSON where the name key was accidentally deleted.","solutions":["Always include the variable name in each clause: {\"name\":\"amount\",\"value\":\"42\",\"operation\":\"EQUALS\"}","If you must find variables by value across all names, query without the variables filter and filter the results client-side by value","Extend/customize the resource (subclass HistoricVariableInstanceBaseResource) if value-only search is a hard requirement","Check upstream Flowable versions or issue trackers for added support of value-only queries"],"exampleFix":"// before\n{\"variables\":[{\"value\":\"42\",\"operation\":\"EQUALS\"}]}\n// after\n{\"variables\":[{\"name\":\"amount\",\"value\":\"42\",\"operation\":\"EQUALS\"}]}","handlingStrategy":"validation","validationCode":"clauses.forEach(c => { if (c.name == null) throw new Error('value-only query not supported; provide name'); });","typeGuard":"function isNamedClause(c) { return c && typeof c.name === 'string' && c.name.length > 0; }","tryCatchPattern":"try { return await queryHistoricVariables(clauses); } catch (e) { if (String(e.message).includes('Value-only query')) { console.error('clause without name rejected', clauses); } throw e; }","preventionTips":["Enforce named clauses in your query-builder API","Filter by value across names client-side instead","Document that this Flowable REST endpoint requires a variable name per clause"],"tags":["rest","flowable","query","unsupported-operation","bad-request"],"backgroundTag":"unsupported-operation","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}