BizTalk: Send Port Filters Get Ignored

by matt 20. February 2008 09:32

This is kind of a not to anyone who does not understand why their send port filters might be being ignored.  It is not the be-all and end-all of the problem as there may be various reasons for the problem occurring.

If you are attempting to use filtering on Send Ports that belong to a Send Port Group, then forget it.  BizTalk Server assumes that if the Send Port Group receives the message, then all Send Ports in that group must want the message regardless of any filters that you may have set up.  It basically ignores the filtering in the port completely. 

This would not be so much of a problem if the Filters were a little more flexible.  however, imagine the scenario:

We have an employee document schema with a promoted property of 'DepartmentID'.  Instances of this schema are used in many places across our solution.  When we receive the employee instances from a particular location, we want to filter them based on the value of the DepartmentID.  If it is 'HR' or 'Payroll', it must go to one location and anything else goes to another location.

So, what we want to say is:

When ((DepartmentID is 'HR') OR (DepartmentID is 'Payroll')) AND (ReceivePortName is 'My Receive Port') send message to location X.

OR

When ((DepartmentID is not 'HR') AND (DepartmentID is not 'Payroll')) AND (ReceivePortName is 'My Receive Port') send message to location Y.

In the above scenario, the first rule can not be applied in a single Send Port Filter because you can not group expressions.  My logical thought to overcome that problem was to put the two Send Ports in to a Send Port Group which could filter based on the Receive Port and then the Send Ports themselves could filter based on the DepartmentID.  Alas no, that would be silly (?!) you can't use the filters if you're in a send port group.

To me, this seems to be a little bit of a bug in BizTalk Server, but no doubt if we ask about it we will be told that it is 'by design'.  So, heads up if you want to do something similar you need to be very careful that you do not 'cross-pollinate' your send ports with other instances of the document you are trying to filter by the looks of things.

Luckily for me, I know that the documents that I am trying to filter are the only instances in my application.  If they were not - I think I might be in trouble.  That would probably leave me with the hideous option of dynamic ports.

Tags:

BizTalk Server

Powered by BlogEngine.NET 1.5.0.7
Theme by Interakting

Interakting

A full service digital agency offering online strategy, design and usability, systems integration and online marketing services that deliver real business benefits and ensure your online objectives are met.

Calendar

<<  July 2010  >>
MoTuWeThFrSaSu
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

View posts in large calendar