flowable/flowable-engine · error · FlowableIllegalArgumentException
Variable value is missing for variable: ${variable.getName()
Error message
Variable value is missing for variable: ${variable.getName()} What it means
For variable query filters whose operation is not EXISTS/NOT_EXISTS, a value is mandatory because the engine compares against it. addVariables throws FlowableIllegalArgumentException when the operation requires a value but variable.getValue() is null.
Source
Thrown at modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/caze/BaseCaseInstanceResource.java:308
* Throws the right exceptions when bad request was made or instance was not found.
*/
protected CaseInstance getCaseInstanceFromRequestWithoutAccessCheck(String caseInstanceId) {
CaseInstance caseInstance = runtimeService.createCaseInstanceQuery().caseInstanceId(caseInstanceId).singleResult();
if (caseInstance == null) {
throw new FlowableObjectNotFoundException("Could not find a case instance with id '" + caseInstanceId + "'.");
}
return caseInstance;
}
protected void addVariables(CaseInstanceQuery caseInstanceQuery, List<QueryVariable> variables) {
for (QueryVariable variable : variables) {
if (variable.getVariableOperation() == null) {
throw new FlowableIllegalArgumentException("Variable operation is missing for variable: " + variable.getName());
}
if (variable.getVariableOperation() != QueryVariableOperation.EXISTS && variable.getVariableOperation() != QueryVariableOperation.NOT_EXISTS) {
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 && variable.getVariableOperation() != QueryVariableOperation.EQUALS) {
throw new FlowableIllegalArgumentException("Value-only query (without a variable-name) is only supported when using 'equals' operation.");
}
switch (variable.getVariableOperation()) {
case EQUALS:
if (nameLess) {
caseInstanceQuery.variableValueEquals(actualValue);
} else {View on GitHub (pinned to d6d39ce1c6)
Solutions
- Provide a value for every comparison operation, e.g. {"name":"amount","value":100,"operation":"GREATER_THAN"}.
- Use operation EXISTS or NOT_EXISTS when you only want to test variable presence without a value.
- Client-side: validate that each non-EXISTS filter has a non-null value before submitting.
- Ensure your JSON payload actually serializes the value field.
Example fix
// before
{"name":"amount","operation":"GREATER_THAN"}
// after
{"name":"amount","value":100,"operation":"GREATER_THAN"} Defensive patterns
Strategy: validation
Validate before calling
vars.forEach(v => {
if (!['EXISTS','NOT_EXISTS'].includes(v.operation) && v.value == null)
throw new Error(`Missing value for variable ${v.name}`);
}); Prevention
- Provide value for all comparison operations.
- Use EXISTS/NOT_EXISTS when no value comparison is needed.
- Check serializer settings so null/false-y values are still sent.
When it happens
Trigger: Query body variables entry like {"name":"amount","operation":"GREATER_THAN"} (no value), or value explicitly null, on /cmmn-query/runtime/case-instances queries.
Common situations: Building dynamic filters where optional values are dropped, serializers omitting null fields, confusing EXISTS (which needs no value) with comparison operators, or empty-string values converted to null upstream.
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
- Variable operation is missing for variable:
- Variable value is missing for variable:
- Value-only query (without a variable-name) is not supported
- Variable operation is missing for variable: ${variable.getNa
- Value-only query (without a variable-name) is only supported
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/230bc1105865a510.
Report an issue: GitHub.