{"record":{"id":"86fe92df9db55c19","repo":"flowable/flowable-engine","slug":"value-only-query-without-a-variable-name-is-only-86fe92","errorCode":null,"errorMessage":"Value-only query (without a variable-name) is only supported when using 'equals' operation.","messagePattern":"Value-only query \\(without a variable-name\\) is only supported when using 'equals' operation\\.","errorType":"http","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/caze/BaseCaseInstanceResource.java","lineNumber":318,"sourceCode":"\n    protected void addVariables(CaseInstanceQuery caseInstanceQuery, 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);\n\n            // A value-only query is only possible using equals-operator\n            if (nameLess && variable.getVariableOperation() != QueryVariableOperation.EQUALS) {\n                throw new FlowableIllegalArgumentException(\"Value-only query (without a variable-name) is only supported when using 'equals' operation.\");\n            }\n\n            switch (variable.getVariableOperation()) {\n\n            case EQUALS:\n                if (nameLess) {\n                    caseInstanceQuery.variableValueEquals(actualValue);\n                } else {\n                    caseInstanceQuery.variableValueEquals(variable.getName(), actualValue);\n                }\n                break;\n\n            case EQUALS_IGNORE_CASE:\n                if (actualValue instanceof String) {\n                    caseInstanceQuery.variableValueEqualsIgnoreCase(variable.getName(), (String) actualValue);\n                } else {\n                    throw new FlowableIllegalArgumentException(\"Only string variable values are supported when ignoring casing, but was: \" + actualValue.getClass().getName());\n                }","sourceCodeStart":300,"sourceCodeEnd":336,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/caze/BaseCaseInstanceResource.java#L300-L336","documentation":"A nameless (value-only) variable filter — one with a null name, meaning 'any variable' — is only meaningful with the EQUALS operation. addVariables throws FlowableIllegalArgumentException if a nameless filter uses any other operation, since comparisons like GREATER_THAN without a name are undefined for the query builder.","triggerScenarios":"Query variables entry such as {\"value\":\"x\",\"operation\":\"LIKE\"} (no name field) or {\"name\":null,\"operation\":\"NOT_EQUALS\",\"value\":\"x\"} in a case-instances query.","commonSituations":"Generic search UIs that omit names for 'search all variables' mode but pass through the user's chosen operator, template engines rendering empty name fields, or copying filters and clearing names.","solutions":["Use operation EQUALS for nameless value-only filters: {\"value\":\"x\",\"operation\":\"EQUALS\"}.","Provide a variable name if you need other operations (LIKE, GREATER_THAN, etc.).","Use EXISTS/NOT_EXISTS with a name to test presence instead of a nameless non-equals filter.","Client-side validation: if name is null, force operation to EQUALS or reject the filter."],"exampleFix":"// before\n{\"value\":\"active\",\"operation\":\"LIKE\"}\n\n// after\n{\"value\":\"active\",\"operation\":\"EQUALS\"}  // nameless, or add \"name\" for LIKE","handlingStrategy":"validation","validationCode":"if (v.name == null && v.operation !== 'EQUALS')\n  throw new Error('Nameless variable filters require operation EQUALS');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Force operation EQUALS when the filter has no name.","Give a name for any non-equals operator.","Reject empty name fields in query-builder UIs for non-equals operators."],"tags":["rest-api","query","validation","flowable"],"backgroundTag":"invalid-argument-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"}