The “copy by reference” and “copy by value” have always been there. When mapping a doc var, it is copy by reference (not really a copy at all–just another var name for the same object). When mapping strings, it is copy by value. The docs cover this.
As @John_Carter4 points out, this is the same behavior as exists in Java. It’s just that in FLOW it is easier to be led to think mapping a document to another document is copying the entire thing. It does not. But if you map the individual string fields within, you’ll get a copy.
I also concur with @John_Carter4 that deepClone is to be used rarely. IME, copying a doc is relatively rare (I think we have it used in one place–indeed, in the example code I recently shared in “normalizeDocument”). Instead, the more typical case is to map fields from one doc to another because you’re transforming the data to send to another target.
#Flow-and-Java-services#webMethods#Integration-Server-and-ESB#webMethods-cloud#webMethods-io-Integration