Friday, February 22, 2008

Binding an orchestration to multiple receive ports

In the BizTalk Server 2006 Admin Console, it's only possible to bind 1 physical Receive Port to 1 logical (Orchestration-)Receive Port.
To bind multiple receive ports to an orchestration, you could follow these steps:
  1. Create multiple Receive Ports with their Receive Locations in the Admin Console,
    use friendly portnames, you need them to create an expression later on.
  2. In your Orchestration select your activating Receive Shape and configure the "Filter Expression" by clicking the ellipsis. In the Filter Expression add as many "BTS.ReceivePortName"-properties as Receive Ports you have created.
    Set the values of the properties to the portnames of the Receive Ports and group each row by "OR".
    The Filter Expression should resemble something like this:
    (BTS.ReceivePortName == "ReceiveMsgPort1") (BTS.ReceivePortName == "ReceiveMsgPort2")
  3. Create an Orchestration Receive Port and specify its binding to "Direct Binding", also make sure "Routing between ports will be defined by filter expressions on incoming messages in the Messagebox database" is selected.
  4. Make sure that the "Partner Orchestration Port"-property of your Orchestration Receive Port is set to "Message Box".
  5. Now deploy your Application, all the messages which originate from the filtered ports will be processed by the Orchestration.

1 comment:

Mallu said...

Its really confusing ...If instead of using Direct Bind port and you use a specify later port by default one suscription is always created with the Recieve PortId

And now if you try to add a filter expression its always

PortId == "Name" AND
waht ever extra filter you add ..There is no way to add a OR condition for the filter with out making it a direct bound port ...