none
Deliver a file to different location selectively RRS feed

  • Question

  • Hi,

    Can BizTalk put a file to different locations in different machines on the network selectively? I have a message that I can convert to a flat file. Depending on the value of a field in the message being A, B or C, I would like to deliver the file to workstation A, B or C. How do I built the intelligence in BizTalk to allow me to achieve my goal? Group port does not seem to work as it sends the file to all members in the group which is not what expected. I am new to Biztalk.

    Thanks

    Tuesday, May 3, 2011 3:30 PM

Answers

  • The field under consideration must be promoted. In that case in your send port group you can set appropriate filter on each send port and accomplish what you want to.
    Please mark as answer if this helps you. Thanks and warm regards Ambar Ray Solution Architect - Microsoft Technologies
    • Marked as answer by FrankTo Tuesday, May 3, 2011 5:24 PM
    Tuesday, May 3, 2011 3:58 PM
  • For promoting fields read Property Schemas, How to Create Property Schemas and Promoting Properties on MSDN. Once the properties are promoted to the message context you can create different send ports and based on the filters you can output the message on the relevant send port.

    For e.g. Your message field "PromotedField" has value A so it should be output to SendPort A. The SendPort A should have the network file folder configured. In the SendPort properties go to Filter. In the filter expression click on the property dropdown and locate your promoted property and set the value A. Repeat these for Send ports B and C. For more read Adding a Static Send Port Using BizTalk Explorer, Adding a Filter to a Send Port for Content-Based Routing Using BizTalk Explorer and How to Configure Filters for a Send Port on MSDN.


    Abdul Rafay - MVP & MCTS BizTalk Server
    blog: http://abdulrafaysbiztalk.wordpress.com/
    Please indicate "Mark as Answer" if this post has answered the question.
    • Marked as answer by FrankTo Tuesday, May 3, 2011 5:24 PM
    Tuesday, May 3, 2011 4:09 PM
  • You can do that read Set Dynamic Destination File Name With BizTalk Server 2006

    BTW you dont need to read the machine name from config files. In the static send port you can change the machine name easily. So in this case no need to go for dynamic send ports.


    Abdul Rafay - MVP & MCTS BizTalk Server
    blog: http://abdulrafaysbiztalk.wordpress.com/
    Please indicate "Mark as Answer" if this post has answered the question.
    • Edited by Abdul Rafay Tuesday, May 3, 2011 5:49 PM changed the article
    • Marked as answer by FrankTo Wednesday, May 4, 2011 7:37 PM
    Tuesday, May 3, 2011 5:38 PM

All replies

  • The field under consideration must be promoted. In that case in your send port group you can set appropriate filter on each send port and accomplish what you want to.
    Please mark as answer if this helps you. Thanks and warm regards Ambar Ray Solution Architect - Microsoft Technologies
    • Marked as answer by FrankTo Tuesday, May 3, 2011 5:24 PM
    Tuesday, May 3, 2011 3:58 PM
  • For promoting fields read Property Schemas, How to Create Property Schemas and Promoting Properties on MSDN. Once the properties are promoted to the message context you can create different send ports and based on the filters you can output the message on the relevant send port.

    For e.g. Your message field "PromotedField" has value A so it should be output to SendPort A. The SendPort A should have the network file folder configured. In the SendPort properties go to Filter. In the filter expression click on the property dropdown and locate your promoted property and set the value A. Repeat these for Send ports B and C. For more read Adding a Static Send Port Using BizTalk Explorer, Adding a Filter to a Send Port for Content-Based Routing Using BizTalk Explorer and How to Configure Filters for a Send Port on MSDN.


    Abdul Rafay - MVP & MCTS BizTalk Server
    blog: http://abdulrafaysbiztalk.wordpress.com/
    Please indicate "Mark as Answer" if this post has answered the question.
    • Marked as answer by FrankTo Tuesday, May 3, 2011 5:24 PM
    Tuesday, May 3, 2011 4:09 PM
  • Thank you so much Abdul. That is exactly what I need. I am new to BizTalk and the information gives me a good head start. Just to confirm your instruction, I will have 3 Port A, B, C configure to send to Workstation A, B, C. Depending on the value in the promoted field, filter A, B, or C is going to let the msg passed through and deposit the file to the correct workstation. Other filter will block the msg. Is my understanding somewhat correct?

    Thanks again!

    Tuesday, May 3, 2011 5:24 PM
  • One more question, Abdul. Can the ports be bound "semi dynamically", meaning I do not want to hard code the machine but prefer to read the information from a config file or a database that allows me to change the physical location of the machines pretty easily?
    Tuesday, May 3, 2011 5:29 PM
  • You can do that read Set Dynamic Destination File Name With BizTalk Server 2006

    BTW you dont need to read the machine name from config files. In the static send port you can change the machine name easily. So in this case no need to go for dynamic send ports.


    Abdul Rafay - MVP & MCTS BizTalk Server
    blog: http://abdulrafaysbiztalk.wordpress.com/
    Please indicate "Mark as Answer" if this post has answered the question.
    • Edited by Abdul Rafay Tuesday, May 3, 2011 5:49 PM changed the article
    • Marked as answer by FrankTo Wednesday, May 4, 2011 7:37 PM
    Tuesday, May 3, 2011 5:38 PM
  • Abdul,

    Thanks again for the information. I think I understood what you were saying but I would like to make sure I understand it correctly.

    1) When you said the port could be changed easily, do you mean we can change it on the fly in the production and do not need to recompile the msi?

    2) Is this possible to have a logic inside BizTalk to go an grab whatever machine name in a table store in the database and send the information to the machine name listed in the table?

    Thanks!

    Wednesday, May 4, 2011 7:43 PM