flowable/flowable-engine · error · FlowableIllegalArgumentException

Value-only query (without a variable-name) is not supported

Error message

Value-only query (without a variable-name) is not supported

What it means

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.

Source

Thrown at modules/flowable-rest/src/main/java/org/flowable/rest/service/api/history/HistoricVariableInstanceBaseResource.java:114

                restResponseFactory::createHistoricVariableInstanceResponseList);
    }

    protected void addVariables(HistoricVariableInstanceQuery variableInstanceQuery, List<QueryVariable> variables) {
        for (QueryVariable variable : variables) {
            if (variable.getVariableOperation() == null) {
                throw new FlowableIllegalArgumentException("Variable operation is missing for variable: " + variable.getName());
            }
            if (variable.getValue() == null) {
                throw new FlowableIllegalArgumentException("Variable value is missing for variable: " + variable.getName());
            }

            boolean nameLess = variable.getName() == null;

            Object actualValue = restResponseFactory.getVariableValue(variable);

            // A value-only query is only possible using equals-operator
            if (nameLess) {
                throw new FlowableIllegalArgumentException("Value-only query (without a variable-name) is not supported");
            }

            switch (variable.getVariableOperation()) {

            case EQUALS:
                variableInstanceQuery.variableValueEquals(variable.getName(), actualValue);
                break;

            default:
                throw new FlowableIllegalArgumentException("Unsupported variable query operation: " + variable.getVariableOperation());
            }
        }
    }
}

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Always include the variable name in each clause: {"name":"amount","value":"42","operation":"EQUALS"}
  2. If you must find variables by value across all names, query without the variables filter and filter the results client-side by value
  3. Extend/customize the resource (subclass HistoricVariableInstanceBaseResource) if value-only search is a hard requirement
  4. Check upstream Flowable versions or issue trackers for added support of value-only queries

Example fix

// before
{"variables":[{"value":"42","operation":"EQUALS"}]}
// after
{"variables":[{"name":"amount","value":"42","operation":"EQUALS"}]}
Defensive patterns

Strategy: validation

Validate before calling

clauses.forEach(c => { if (c.name == null) throw new Error('value-only query not supported; provide name'); });

Type guard

function isNamedClause(c) { return c && typeof c.name === 'string' && c.name.length > 0; }

Try / catch

try { return await queryHistoricVariables(clauses); } catch (e) { if (String(e.message).includes('Value-only query')) { console.error('clause without name rejected', clauses); } throw e; }

Prevention

When it happens

Trigger: 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.

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

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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