{"record":{"id":"4bfa847538949a08","repo":"flowable/flowable-engine","slug":"org-flowable-cdi-impl-processvariablemap-values","errorCode":null,"errorMessage":"org.flowable.cdi.impl.ProcessVariableMap.values() is not supported.","messagePattern":"org\\.flowable\\.cdi\\.impl\\.ProcessVariableMap\\.values\\(\\) is not supported\\.","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cdi/src/main/java/org/flowable/cdi/impl/ProcessVariableMap.java","lineNumber":97,"sourceCode":"\r\n    @Override\r\n    public Object remove(Object key) {\r\n        throw new UnsupportedOperationException(\"ProcessVariableMap.remove is unsupported. Use ProcessVariableMap.put(key, null)\");\r\n    }\r\n\r\n    @Override\r\n    public void clear() {\r\n        throw new UnsupportedOperationException(ProcessVariableMap.class.getName() + \".clear() is not supported.\");\r\n    }\r\n\r\n    @Override\r\n    public Set<String> keySet() {\r\n        throw new UnsupportedOperationException(ProcessVariableMap.class.getName() + \".keySet() is not supported.\");\r\n    }\r\n\r\n    @Override\r\n    public Collection<Object> values() {\r\n        throw new UnsupportedOperationException(ProcessVariableMap.class.getName() + \".values() is not supported.\");\r\n    }\r\n\r\n    @Override\r\n    public Set<Map.Entry<String, Object>> entrySet() {\r\n        throw new UnsupportedOperationException(ProcessVariableMap.class.getName() + \".entrySet() is not supported.\");\r\n    }\r\n\r\n}\r\n","sourceCodeStart":79,"sourceCodeEnd":106,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cdi/src/main/java/org/flowable/cdi/impl/ProcessVariableMap.java#L79-L106","documentation":"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.","triggerScenarios":"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.","commonSituations":"Debug logging like log.debug(\"vars={}\", map) which triggers entrySet/toString; copying all variables; test assertions comparing full maps.","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."],"exampleFix":"// before\nlogger.debug(\"Process variables: {}\", processVariableMap); // calls entrySet() -> throws\n\n// after\nlogger.debug(\"myVar={}, otherVar={}\", processVariableMap.get(\"myVar\"), processVariableMap.get(\"otherVar\"));","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { logger.debug(\"vars={}\", processVariableMap); } catch (UnsupportedOperationException e) { /* log named variables via get(name) instead */ }","preventionTips":["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"],"tags":["java","cdi","unsupported-operation","map"],"backgroundTag":"unsupported-operation","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}