BizTalk Gurus

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

rated by 0 users
Not Answered This post has 0 verified answers | 4 Replies | 1 Follower

posted on Wed, Jul 1 2009 8:22 PM

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 

All Replies

Top 10 Contributor
877 Posts

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");

 

replied on Thu, Jul 2 2009 3:26 AM

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

Top 10 Contributor
877 Posts

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")

 

 

replied on Thu, Jul 2 2009 2:22 PM

Thanks Greg, I was able to get it working.

Page 1 of 1 (5 items) | RSS