RecieveLocationName missing and a workaround

I've had the situation recently where I wanted to set up a receive port and have a large number of receive locations feeding into this port. In normal scenario this works fine but in my case it did not and had to find a workaround for it.

The reason the scenario above did not work is because I needed to know the receive location's name that the message came in on and the only property available from the context within an orchestration is BTS.ReceivePortName which is the same for all the locations.

I did some digging and for some alternatives, one was a custom pipeline which found and promoted the property "ReceiveLocationName", the second was a message context functoid on CodePlex which could retrieve this value from within a map. I didn't like either option and tried to widdle the code from the functoid into something I could use in a small helper class method or even the expression shape. I got the code to work but could never seem to find the ReceiveLocationName property I'd seen mentioned on other blogs. My guess is that it only appears with certain adapters but I couldn't even find it in any of the BizTalk schemas.

I decided to make a U-turn from this custom approach because I was just replacing a large number of receive ports with custom code. So instead of the custom approach I'd been working on I decided to make the initial receive shape in the orchestration direct bound and create 1-n ports which I could leverage in the orchestration without knowing the ReceiveLocationName.

No comments: