So what does Msg2(*) = Msg1(*) do exactly?

A question was recently raised on the 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(*)’):

Message Assignment Shape - Orchestration Example UsageThe Message Assignment shape would be configured as follows: Message Assignment Shape - Expression Example UsageThis 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.

Host Delete Failed – Quick (Unsupported) Fix

My development environment has become sluggish and error prone, so in an attempt to regain some productivity, I set about cleaning the various Hosts and Host Instances from the installation. Unfortunately, while attempting to delete a BizTalk Host through the Admin Console, I received the following error:

Cannot insert duplicate key row in object ‘dbo.InstancesSuspended’ with unique index ‘IX_InstancesSuspended_InstanceID’

The fix was relatively simple – all records were deleted from the MsgBox database dbo.InstancesSuspended and dbo.Instances tables and the issue was immediately resolved.

I do not advocate deleting anything in the BizTalk databases – especially in a live environment – any changes are unsupported by Microsoft. In this case, I didn’t want to waste a hour or so unconfiguring and re-configuring the whole BizTalk environment; if I had balked the environment, I would have had to un-configure and re-configure anyway.

If you thinking of doing this in live, DON’T; call Microsoft and let them help you sort the problem.

A screenshot of the actual error message is below:
Host Delete Failed
(On a slightly different note, my blogging hiatus is over – hooray!)