flowable/flowable-engine · error · UnsupportedOperationException
org.flowable.cdi.impl.ProcessVariableMap.values() is not…
Error message
org.flowable.cdi.impl.ProcessVariableMap.values() is not supported.
What it means
ProcessVariableMap.values() throws UnsupportedOperationException unconditionally, and entrySet() below it does the same. The CDI map is intentionally only a keyed get/put facade over BusinessProcess; no enumeration of values or entries is possible.
Solutions
- Log or compare specific variables via get(name) instead of dumping the map.
- Enumerate variables via the engine's variable query/VariableScope API when you need all entries.
- Keep ProcessVariableMap out of toString/logging-generic helpers.
Example fix
// before
logger.debug("Process variables: {}", processVariableMap); // calls entrySet() -> throws
// after
logger.debug("myVar={}, otherVar={}", processVariableMap.get("myVar"), processVariableMap.get("otherVar")); Defensive patterns
Strategy: try-catch
Try / catch
try { logger.debug("vars={}", processVariableMap); } catch (UnsupportedOperationException e) { /* log named variables via get(name) instead */ } Prevention
- Never log or toString() the CDI variable map (entrySet() throws)
- Log only the variables you know by name
- Use engine variable queries when a full snapshot is needed
When it happens
Trigger: Calling values() or entrySet() directly; printing the map (Map.toString() calls entrySet()); iterating entries in a for-each; libraries that snapshot a Map's entries.
Common situations: Debug logging like log.debug("vars={}", map) which triggers entrySet/toString; copying all variables; test assertions comparing full maps.
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.clear() is not…
- org.flowable.cdi.impl.ProcessVariableMap.containsKey() is…
- org.flowable.cdi.impl.ProcessVariableMap.containsValue() is…
- org.flowable.cdi.impl.ProcessVariableMap.isEmpty() is not…
- org.flowable.cdi.impl.ProcessVariableMap.keySet() is not…
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/4bfa847538949a08.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-cdi/src/main/java/org/flowable/cdi/impl/ProcessVariableMap.java:97
@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
public Collection<Object> values() {
throw new UnsupportedOperationException(ProcessVariableMap.class.getName() + ".values() is not supported.");
}
@Override
public Set<Map.Entry<String, Object>> entrySet() {
throw new UnsupportedOperationException(ProcessVariableMap.class.getName() + ".entrySet() is not supported.");
}
}
View on GitHub (pinned to d6d39ce1c6)