Pages

Routing Message Through Recieve Locations Using Filters in Biztalk

Wednesday, September 14, 2011
Q

Hi
I have a situation where I need one receive port with two receive locations. Which is not a problem.
E.g. ReceivePort 1 / ReceiveLocationA & ReceiveLocationB
However I need to send all files that are received by ReceiveLocationB to a specific directory.
Therefore i have created a send port with a filter on it. But there does'nt appear to be a filter for BTS.ReceiveLocationName. There is for ReceivePortName, but this would pick up files from both receive locations.
Any help would be much appreciated.

Sol:
The idea of having multiple receive locations in a receive port is to receive messages from multiple locations and treat them in the same way in BizTalk. But your requirement is to put the messages into separate directories. You can easily do this by using two receive ports and each having only one receive location. Now you can create  two send ports with filters set for corresponding receive ports via BTS.ReceivePortName. Hope this helps.
  • Create two receive ports with their own receive locations
  • If using different adapters, use adapter specific properties to identify
  • Promote a custom property and route on that


or You can also  try setting the filter as  BTS.InboundTransportLocation == "C:\test\in\*.*"

or

A solution is to create a custom pipeline component that writes and promotes properties. Jon Flanders has created a good generic component to do this: the ContextAdder Pipeline Component (downloable from his blog). You can through promoted property route it to send port. HTH
Regards,
Also

Check this great post by Evan Aussenberg: How To Expose the BTS ReceiveLocationName Property

No comments:

Post a Comment

Post Your Comment...