{"record":{"id":"2946f9c084b69744","repo":"flowable/flowable-engine","slug":"the-variable-value-does-not-contain-an-operator-va","errorCode":null,"errorMessage":"The variable value does not contain an operator value","messagePattern":"The variable value does not contain an operator value","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/delete/BatchDeleteCaseConfig.java","lineNumber":324,"sourceCode":"    }\n\n    protected static void populateOrQueryObjects(JsonNode orQueryObjectsNode, HistoricCaseInstanceQuery query, CmmnEngineConfiguration engineConfiguration) {\n        if (orQueryObjectsNode.isArray()) {\n            for (JsonNode orQueryObjectNode : orQueryObjectsNode) {\n                HistoricCaseInstanceQuery orQuery = query.or();\n                populateQuery(orQueryObjectNode, orQuery, engineConfiguration);\n                query.endOr();\n            }\n        }\n    }\n\n    protected static void populateQueryVariableValues(JsonNode variableValuesNode, HistoricCaseInstanceQuery query,\n            CmmnEngineConfiguration engineConfiguration) {\n        if (variableValuesNode.isArray()) {\n            for (JsonNode variableValue : variableValuesNode) {\n                String operatorString = variableValue.path(\"operator\").stringValue(null);\n                if (operatorString == null) {\n                    throw new FlowableIllegalArgumentException(\"The variable value does not contain an operator value\");\n                }\n\n                QueryOperator operator = QueryOperator.valueOf(operatorString);\n                String variableName = variableValue.path(\"name\").stringValue(null);\n                switch (operator) {\n                    case EQUALS:\n                        if (variableName != null) {\n                            query.variableValueEquals(variableName, extractVariableValue(variableValue, engineConfiguration));\n                        } else {\n                            query.variableValueEquals(extractVariableValue(variableValue, engineConfiguration));\n                        }\n                        break;\n                    case NOT_EQUALS:\n                        query.variableValueNotEquals(variableName, extractVariableValue(variableValue, engineConfiguration));\n                        break;\n                    case GREATER_THAN:\n                        query.variableValueGreaterThan(variableName, extractVariableValue(variableValue, engineConfiguration));\n                        break;","sourceCodeStart":306,"sourceCodeEnd":342,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/delete/BatchDeleteCaseConfig.java#L306-L342","documentation":"Thrown by populateQueryVariableValues() when a variable value node inside the query JSON has no 'operator' field. The operator is mandatory to know how to compare the variable value on the HistoricCaseInstanceQuery. Thrown before any query API call is made.","triggerScenarios":"Batch configuration JSON's variableValues array contains an element missing the 'operator' key, or the key is misspelled (e.g. 'Operator').","commonSituations":"Hand-written or migrated batch JSON where the operator field was omitted; tools that serialize variable values without their operator; JSON produced by a different code path.","solutions":["Add an 'operator' field with a valid QueryOperator name (e.g. EQUALS, NOT_EQUALS, GREATER_THAN) to each variable value node","Validate the JSON schema of the batch configuration before submitting","Regenerate the batch configuration programmatically via the public query API"],"exampleFix":"// before\n{\"name\":\"count\",\"type\":\"integer\",\"value\":5}\n// after\n{\"name\":\"count\",\"type\":\"integer\",\"value\":5,\"operator\":\"GREATER_THAN\"}","handlingStrategy":"validation","validationCode":"for (JsonNode v : variableValuesNode) {\n    if (!v.hasNonNull(\"operator\")) throw new IllegalArgumentException(\"variable value missing operator\");\n    QueryOperator.valueOf(v.get(\"operator\").stringValue(null));\n}","typeGuard":"boolean hasOperator(JsonNode n) { return n != null && n.path(\"operator\").stringValue(null) != null; }","tryCatchPattern":"try { createBatch(cmd); } catch (FlowableIllegalArgumentException e) { if (e.getMessage().contains(\"operator value\")) { log.error(\"Add operator to every variable value\", e); } throw e; }","preventionTips":["Always serialize name, operator, type and value together for variable value nodes","Validate batch JSON against a schema before submission","Use enum values exactly as spelled in QueryOperator"],"tags":["flowable","cmmn","query","json","missing-field"],"backgroundTag":"missing-required-argument","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"}