flowable/flowable-engine · error · UnsupportedOperationException
org.flowable.cdi.impl.ProcessVariableMap.containsValue() is
Error message
org.flowable.cdi.impl.ProcessVariableMap.containsValue() is not supported.
What it means
ProcessVariableMap.containsValue(Object) throws UnsupportedOperationException unconditionally. Scanning all process variables by value would require full variable enumeration, which the map view does not implement.
Source
Thrown at modules/flowable-cdi/src/main/java/org/flowable/cdi/impl/ProcessVariableMap.java:77
@Override
public int size() {
throw new UnsupportedOperationException(ProcessVariableMap.class.getName() + ".size() is not supported.");
}
@Override
public boolean isEmpty() {
throw new UnsupportedOperationException(ProcessVariableMap.class.getName() + ".isEmpty() is not supported.");
}
@Override
public boolean containsKey(Object key) {
throw new UnsupportedOperationException(ProcessVariableMap.class.getName() + ".containsKey() is not supported.");
}
@Override
public boolean containsValue(Object value) {
throw new UnsupportedOperationException(ProcessVariableMap.class.getName() + ".containsValue() is not supported.");
}
@Override
public Object remove(Object key) {
throw new UnsupportedOperationException("ProcessVariableMap.remove is unsupported. Use ProcessVariableMap.put(key, null)");
}
@Override
public void clear() {
throw new UnsupportedOperationException(ProcessVariableMap.class.getName() + ".clear() is not supported.");
}
@Override
public Set<String> keySet() {
throw new UnsupportedOperationException(ProcessVariableMap.class.getName() + ".keySet() is not supported.");
}
@Override
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Use get(name) for the specific variables you care about and compare values yourself.
- Enumerate variables via the process engine query API instead of the CDI map.
- Rewrite the check to be name-based rather than value-based.
Example fix
// before
boolean hasCustomer = processVariableMap.containsValue(customer);
// after
boolean hasCustomer = customer.equals(processVariableMap.get("customerVar")); Defensive patterns
Strategy: validation
Validate before calling
// value lookup must be name-based
boolean hasCustomer = Objects.equals(customer, processVariableMap.get("customerVar")); Try / catch
try { has = processVariableMap.containsValue(v); } catch (UnsupportedOperationException e) { /* fall back to per-name get comparisons */ } Prevention
- Design lookups around variable names, not values
- Use engine variable queries for value-based searches
- Do not use reverse-lookup Map helpers on this map
When it happens
Trigger: Calling containsValue(x) directly; helper libraries that use containsValue for reverse lookups or de-duplication before inserting into a Map.
Common situations: Generic code that prevents duplicate values across any Map; diagnostics code searching which variable holds a given value.
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
- org.flowable.cdi.impl.ProcessVariableMap.size() is not suppo
- org.flowable.cdi.impl.ProcessVariableMap.isEmpty() is not su
- org.flowable.cdi.impl.ProcessVariableMap.containsKey() is no
- ProcessVariableMap.remove is unsupported. Use ProcessVariabl
- org.flowable.cdi.impl.ProcessVariableMap.clear() is not supp
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/5ddb7d281b590849.
Report an issue: GitHub.