{"record":{"id":"217c7040940405d0","repo":"flowable/flowable-engine","slug":"not-supported-to-get-bytes","errorCode":null,"errorMessage":"Not supported to get bytes","messagePattern":"Not supported to get bytes","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/delete/BatchDeleteProcessConfig.java","lineNumber":550,"sourceCode":"        }\n\n        @Override\n        public Double getDoubleValue() {\n            JsonNode doubleNode = node.path(\"doubleValue\");\n            if (doubleNode.isNumber()) {\n                return doubleNode.doubleValue();\n            }\n            return null;\n        }\n\n        @Override\n        public void setDoubleValue(Double doubleValue) {\n            throw new UnsupportedOperationException(\"Not supported to set double value\");\n        }\n\n        @Override\n        public byte[] getBytes() {\n            throw new UnsupportedOperationException(\"Not supported to get bytes\");\n        }\n\n        @Override\n        public void setBytes(byte[] bytes) {\n            throw new UnsupportedOperationException(\"Not supported to set bytes\");\n        }\n\n        @Override\n        public Object getCachedValue() {\n            throw new UnsupportedOperationException(\"Not supported to set get cached value\");\n        }\n\n        @Override\n        public void setCachedValue(Object cachedValue) {\n            throw new UnsupportedOperationException(\"Not supported to set cached value\");\n        }\n    }\n}","sourceCodeStart":532,"sourceCodeEnd":568,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/delete/BatchDeleteProcessConfig.java#L532-L568","documentation":"getBytes() in BatchDeleteProcessConfig's VariableScope template throws UnsupportedOperationException because byte-array (bytea/blob) variables are not represented in the JSON-backed delete snapshot. It is a deliberate interface-compliance stub.","triggerScenarios":"Calling getBytes() on the template scope — e.g. generic variable iteration code that reads all variable types, including byte-array content, during batch delete configuration.","commonSituations":"Export/backup tooling reading binary variable content while deleting instances; generic VariableScope readers that assume every getter works; debugging/inspection of the delete template scope.","solutions":["Read byte-array variables directly via runtimeService.getVariable(...) or VariableInstanceQuery before the batch deletion","Skip binary variables when iterating the delete template scope (filter by type first)","Catch UnsupportedOperationException as a signal the scope cannot supply byte content","Extend the template scope with byte support if your batch flow must serialize binaries"],"exampleFix":"// before\nbyte[] data = batchScope.getBytes(); // throws\n// after\nObject v = runtimeService.getVariable(processInstanceId, varName);\nbyte[] data = (v instanceof byte[]) ? (byte[]) v : null;","handlingStrategy":"fallback","validationCode":"// check variable type before reading binary content\nObject v = runtimeService.getVariable(processInstanceId, varName);\nif (v instanceof byte[]) { byte[] data = (byte[]) v; }","typeGuard":"byte[] safeGetBytes(VariableScope s) {\n    try { return s.getBytes(); } catch (UnsupportedOperationException e) { return null; }\n}","tryCatchPattern":"try {\n    byte[] data = scope.getBytes();\n} catch (UnsupportedOperationException e) {\n    // template scope has no binary support; fetch via runtimeService.getVariable\n}","preventionTips":["Read binary variables via runtimeService/VariableInstanceQuery, not the delete template","Skip byte[] variables when iterating delete-snapshot scopes","Back up binary variable content before scheduling instance deletion"],"tags":["unsupported-operation","flowable","batch-delete","byte-array"],"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"}