{"record":{"id":"ee294989dd81dde9","repo":"flowable/flowable-engine","slug":"not-supported-to-set-double-value","errorCode":null,"errorMessage":"Not supported to set double value","messagePattern":"Not supported to set double value","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/delete/BatchDeleteProcessConfig.java","lineNumber":545,"sourceCode":"        }\n\n        @Override\n        public void setLongValue(Long longValue) {\n            throw new UnsupportedOperationException(\"Not supported to set long value\");\n        }\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","sourceCodeStart":527,"sourceCodeEnd":563,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/delete/BatchDeleteProcessConfig.java#L527-L563","documentation":"setDoubleValue(Double) on BatchDeleteProcessConfig's template VariableScope is an intentional unsupported stub; the scope exists solely to serialize variable snapshots for batch deletion and rejects all mutations.","triggerScenarios":"Calling setDoubleValue on the template scope, e.g. from shared numeric-variable update logic run against the delete config.","commonSituations":"Variable normalization/cleanup routines applied during mass deletion; code paths shared with runtime variable updates; misuse of the delete template as a general scope.","solutions":["Write double variables via runtimeService.setVariable on live instances prior to deletion","Use only the JSON-backed getters on this scope","Catch UnsupportedOperationException when defensively writing to unknown scopes","Implement a custom writable VariableScope if the flow requires mutation"],"exampleFix":"// before\nbatchScope.setDoubleValue(1.5); // throws\n// after\nruntimeService.setVariable(processInstanceId, \"ratio\", 1.5);","handlingStrategy":"try-catch","validationCode":"if (scope instanceof org.flowable.engine.impl.delete.BatchDeleteProcessConfig.DeleteVariableScope) {\n    // unsupported setter; route writes to runtimeService\n}","typeGuard":null,"tryCatchPattern":"try {\n    scope.setDoubleValue(v);\n} catch (UnsupportedOperationException e) {\n    runtimeService.setVariable(processInstanceId, varName, v);\n}","preventionTips":["Reject writes to delete-template scopes early in shared utilities","Keep numeric variable updates on live instances pre-deletion","Review stubbed methods before passing arbitrary VariableScope to setters"],"tags":["unsupported-operation","flowable","batch-delete","immutable-scope"],"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"}