flowable/flowable-engine · error · FlowableIllegalArgumentException

The variable value does not contain an operator value

Error message

The variable value does not contain an operator value

What it means

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.

Source

Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/delete/BatchDeleteCaseConfig.java:324

    }

    protected static void populateOrQueryObjects(JsonNode orQueryObjectsNode, HistoricCaseInstanceQuery query, CmmnEngineConfiguration engineConfiguration) {
        if (orQueryObjectsNode.isArray()) {
            for (JsonNode orQueryObjectNode : orQueryObjectsNode) {
                HistoricCaseInstanceQuery orQuery = query.or();
                populateQuery(orQueryObjectNode, orQuery, engineConfiguration);
                query.endOr();
            }
        }
    }

    protected static void populateQueryVariableValues(JsonNode variableValuesNode, HistoricCaseInstanceQuery query,
            CmmnEngineConfiguration engineConfiguration) {
        if (variableValuesNode.isArray()) {
            for (JsonNode variableValue : variableValuesNode) {
                String operatorString = variableValue.path("operator").stringValue(null);
                if (operatorString == null) {
                    throw new FlowableIllegalArgumentException("The variable value does not contain an operator value");
                }

                QueryOperator operator = QueryOperator.valueOf(operatorString);
                String variableName = variableValue.path("name").stringValue(null);
                switch (operator) {
                    case EQUALS:
                        if (variableName != null) {
                            query.variableValueEquals(variableName, extractVariableValue(variableValue, engineConfiguration));
                        } else {
                            query.variableValueEquals(extractVariableValue(variableValue, engineConfiguration));
                        }
                        break;
                    case NOT_EQUALS:
                        query.variableValueNotEquals(variableName, extractVariableValue(variableValue, engineConfiguration));
                        break;
                    case GREATER_THAN:
                        query.variableValueGreaterThan(variableName, extractVariableValue(variableValue, engineConfiguration));
                        break;

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Add an 'operator' field with a valid QueryOperator name (e.g. EQUALS, NOT_EQUALS, GREATER_THAN) to each variable value node
  2. Validate the JSON schema of the batch configuration before submitting
  3. Regenerate the batch configuration programmatically via the public query API

Example fix

// before
{"name":"count","type":"integer","value":5}
// after
{"name":"count","type":"integer","value":5,"operator":"GREATER_THAN"}
Defensive patterns

Strategy: validation

Validate before calling

for (JsonNode v : variableValuesNode) {
    if (!v.hasNonNull("operator")) throw new IllegalArgumentException("variable value missing operator");
    QueryOperator.valueOf(v.get("operator").stringValue(null));
}

Type guard

boolean hasOperator(JsonNode n) { return n != null && n.path("operator").stringValue(null) != null; }

Try / catch

try { createBatch(cmd); } catch (FlowableIllegalArgumentException e) { if (e.getMessage().contains("operator value")) { log.error("Add operator to every variable value", e); } throw e; }

Prevention

When it happens

Trigger: Batch configuration JSON's variableValues array contains an element missing the 'operator' key, or the key is misspelled (e.g. 'Operator').

Common situations: 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.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/2946f9c084b69744. Report an issue: GitHub.