Tips & Trix : Send port filters

I usually don’t create complex send port filters, in BizTalk, with AND / OR conditions mixed together, but last week this was what I had to do.

My idea was something like this:

Custom.Property.ReceivingSystem = System AND
Bts.Messagetype =http://schemas.company.com/messagetype#rootelement AND
(
       BTS.ReceivePortName = Receive_Port_Name_1 OR
      
BTS.ReceivePortName = Receive_Port_Name_2 OR
      
BTS.ReceivePortName = Receive_Port_Name_3
)

So I create my send port filter

BTS ADMIN 

 

 For this send port we will get messages like every minute and I verified that the messages came through,
what I didn’t note at first was that for each expected message we did get like three messages. 

The thing is that the above filter will actually work like this:

Custom.Property.ReceivingSystem = System AND
Bts.Messagetype =http://schemas.company.com/messagetype#rootelement AND
BTS.ReceivePortName = Receive_Port_Name_1 OR
BTS.ReceivePortName = Receive_Port_Name_2 OR
BTS.ReceivePortName = Receive_Port_Name_3

  

I.e. you will get everything from Receive port name 2 and 3 but from Receive port name 1 you will only get messages that meet the requirement for Custom.Property.ReceivingSystem = System AND Bts.MessageType =http://schemas.company.com/messagetype#rootelement

.In order to get the filter to work like expected it must be something like this:

 BTS ADMIN

 

I.e much more rows to add in the very unfriendly send port filter interface, or you can of course solve it with multiple send ports.

 /Renée

 

Leave a Reply

Your email address will not be published. Required fields are marked *