A question was recently raised on the biztalkgurus.com forum, that went something along the lines of:
I’ve seen the phrase Message2(*) = Message1(*) in the ‘helper text’ for the Message Assignment shape, but I’m not too sure what it does, or how it is different from Message2 = Message1. Any ideas?
I replied to the question, albeit in haste and posted an incorrect answer, stating that Message2 = Message 1 copies only the message parts and not the context, whereas Message2(*) = Message1(*) copies everything *including* the context. I was mercilessly shot down by both Tomas Restrepo and Stephen W. Thomas for providing an incorrect answer (thanks guys!).
In an attempt to save face, I spent some time today investigating exactly what that statement does (given that there is little useful information available on the interweb). As correctly answered by Tomas and Stephen:
Message2(*) = Message1(*) copies across only the *context* of the message and nothing else. The purpose of the statement is to allow you to copy context properties to a new message that has been created using a transformation (a map) as context properties aren’t copied across in a map.
In my test scenario, I created two messages: one from a map and a second from a map plus the construct statement above, to copy across the context properties. The results can be found in the following two screenshots: standalone transformation and transformation plus context properties. As you can see, the properties have been copied across in the latter.
Its usage would be something along the following lines – in a construct message shape, the statement would appear following a transformation (‘Apply Map’) in the Message Assignment shape (‘Two(*) = One(*)’):
The Message Assignment shape would be configured as follows: This has certainly been a learning experience for me and something that I should have known, but I’m happy to admit I’m wrong. Thanks to Tomas and Stephen in showing me the error of my ways.