I want to route the incoming file (based on the filename) to different directories

Home Page Forums BizTalk 2004 – BizTalk 2010 I want to route the incoming file (based on the filename) to different directories

Viewing 1 reply thread
  • Author
    Posts
    • #22763

      I am new to Biztalk, I need help in doing the following

      1. If the incoming filename contains the text “ABC” then route the file to directory A, else route the file to directory B

      I have created a pipeline and I have created an orchestration, I have a decide block, but I dont know how to check for the above expression. I read somewhere that FILE.ReceivedFileName will give the input filename.

      How do I use this to check for my condition? Any help is appreciated 

    • #22765

      InputMessage(FILE.ReceivedFilename) will return a string with the received file name. Where InputMessage is the name of the message you receive in the orchestration. 

      You could try:

      InputMessage(FILE.ReceivedFilename).Contains(“ABC”);

      • #22767

        Thanks for your reply. 

        I created an Orchestration Message parameter “test”

        I have this in the expression of the decide block

        test(FILE.ReceivedFileName).Contains(“ABC”)

        I am still getting the error (Illegal dotted name)

        Please let me know if I am doing anything wrong

        • #22768

          You may have to assign this property to a string variable in an expression shape before the decide shape.

          stringVariable = test(FILE.ReceivedFileName);

          Then in the decide shape:

          stringVariable.Contains(“ABC”)

           

          • #22783

            Thanks Greg, I was able to get it working.

            • #26568

              It is not working for me. The file is going to one location even if I am not giving the specific keyword.

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.