flowable/flowable-engine · error · ActivitiIllegalArgumentException
Booleans and null cannot be used in 'greater than or equal'…
Error message
Booleans and null cannot be used in 'greater than or equal' condition
What it means
ActivitiIllegalArgumentException thrown by addVariable when a null or Boolean value is used with the GREATER_THAN_OR_EQUAL operator. Null/boolean values only support EQUALS and NOT_EQUALS comparisons, so inclusive lower-bound conditions reject them at build time.
Solutions
- Null-check the lower bound and only add the condition when a real value is present.
- Replace with variableValueEquals when the value is boolean.
- Add upstream type validation so booleans are mapped to EQUALS conditions automatically.
Example fix
// before
query.processVariableGreaterThanOrEqual("dueDate", lowerBound);
// after
if (lowerBound != null) {
query.processVariableGreaterThanOrEqual("dueDate", lowerBound);
} Defensive patterns
Strategy: type-guard
Validate before calling
if (lowerBound != null && !(lowerBound instanceof Boolean)) {
query.processVariableGreaterThanOrEqual(name, lowerBound);
} Type guard
boolean isOrderable(Object v) { return v != null && !(v instanceof Boolean); } Try / catch
try {
query.processVariableGreaterThanOrEqual(name, lowerBound);
} catch (ActivitiIllegalArgumentException e) {
log.warn("Skipping lower-bound filter: {}", e.getMessage());
} Prevention
- Only add inclusive lower bounds when a real value is present
- Use variableValueEquals for boolean flags
- Sanitize range-filter inputs at the API boundary
When it happens
Trigger: Calling variableValueGreaterThanOrEqual(name, null) or variableValueGreaterThanOrEqual(name, aBoolean), including via generic dynamic query construction.
Common situations: Date/number range filters where the lower bound is an unset (null) form field, or a boolean feature flag wired into a range query.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- Booleans and null cannot be used in 'greater than' condition
- Booleans and null cannot be used in 'less than' condition
- Booleans and null cannot be used in 'less than or equal'…
- activity tenant id is null
- Booleans and null cannot be used in 'greater than' condition
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/f576ec79fdac64e4.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/AbstractVariableQueryImpl.java:182
@SuppressWarnings("unchecked")
public T variableValueLikeIgnoreCase(String name, String value, boolean localScope) {
addVariable(name, value, QueryOperator.LIKE_IGNORE_CASE, localScope);
return (T) this;
}
private void addVariable(String name, Object value, QueryOperator operator, boolean localScope) {
if (name == null) {
throw new ActivitiIllegalArgumentException("name is null");
}
if (value == null || isBoolean(value)) {
// Null-values and booleans can only be used in EQUALS and NOT_EQUALS
switch (operator) {
case GREATER_THAN:
throw new ActivitiIllegalArgumentException("Booleans and null cannot be used in 'greater than' condition");
case LESS_THAN:
throw new ActivitiIllegalArgumentException("Booleans and null cannot be used in 'less than' condition");
case GREATER_THAN_OR_EQUAL:
throw new ActivitiIllegalArgumentException("Booleans and null cannot be used in 'greater than or equal' condition");
case LESS_THAN_OR_EQUAL:
throw new ActivitiIllegalArgumentException("Booleans and null cannot be used in 'less than or equal' condition");
}
if (operator == QueryOperator.EQUALS_IGNORE_CASE && !(value instanceof String)) {
throw new ActivitiIllegalArgumentException("Only string values can be used with 'equals ignore case' condition");
}
if (operator == QueryOperator.NOT_EQUALS_IGNORE_CASE && !(value instanceof String)) {
throw new ActivitiIllegalArgumentException("Only string values can be used with 'not equals ignore case' condition");
}
if ((operator == QueryOperator.LIKE || operator == QueryOperator.LIKE_IGNORE_CASE) && !(value instanceof String)) {
throw new ActivitiIllegalArgumentException("Only string values can be used with 'like' condition");
}
}
queryVariableValues.add(new QueryVariableValue(name, value, operator, localScope));
}View on GitHub (pinned to d6d39ce1c6)