{"record":{"id":"80e9dede41abdeb3","repo":"flowable/flowable-engine","slug":"value-only-query-without-a-variable-name-is-only-80e9de","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":"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":378,"sourceCode":"    protected void addTaskvariables(TaskQuery taskQuery, List<QueryVariable> variables) {\n\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                    taskQuery.taskVariableValueEquals(actualValue);\n                } else {\n                    taskQuery.taskVariableValueEquals(variable.getName(), actualValue);\n                }\n                break;\n\n            case EQUALS_IGNORE_CASE:\n                if (actualValue instanceof String) {\n                    taskQuery.taskVariableValueEqualsIgnoreCase(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":360,"sourceCodeEnd":396,"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#L360-L396","documentation":"This FlowableIllegalArgumentException is thrown when a task variable query criterion has no variable name (a value-only search across all variables) but uses an operation other than equals. Flowable can only implement value-only matching for the equals operation; any other operator needs a variable name to build its predicate. Raised in TaskBaseResource.addTaskvariables.","triggerScenarios":"POST /cmmn-query/tasks with {\"taskVariables\":[{\"value\":\"x\",\"operation\":\"like\"}]} or any nameless variable whose operation is not equals.","commonSituations":"Developers experimenting with 'search all variables for value X' then switching the operator to like/notEquals, or UI builders that omit the name field when users don't pick a variable but do pick an operator.","solutions":["Set a variable name on the criterion, or","Change the operation to equals, which is the only operation supported for value-only queries.","Drop the criterion entirely if neither is possible."],"exampleFix":"// before\n{\"taskVariables\":[{\"operation\":\"like\",\"value\":\"%foo%\"}]}\n// after\n{\"taskVariables\":[{\"name\":\"description\",\"operation\":\"like\",\"value\":\"%foo%\"}]}","handlingStrategy":"validation","validationCode":"for (const v of body.taskVariables || []) {\n  if ((v.name === undefined || v.name === null) && v.operation !== 'equals') {\n    throw new Error('Value-only task variable query requires operation equals');\n  }\n}","typeGuard":"const isNamelessEquals = v => (v.name == null) && v.operation === 'equals';","tryCatchPattern":null,"preventionTips":["Only use nameless criteria for global equals searches","Require a variable name before offering other operators in UIs"],"tags":["rest-api","query","validation","flowable"],"backgroundTag":"invalid-query-parameter","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"}