BizTalk Gurus

Filter on receive port by filename

rated by 0 users
This post has 7 Replies | 1 Follower

Posted: Thu, Apr 19 2007 4:52 AM

Hi

I am working on an orchestration where i want to receive a binary file with a specific filename from a receivelocation.

I want to move the specific file leaving the other files untouched.

Is it in any way possible to filter on filename in the receive shape, or is there a smarter way to do it ?   

If it is possible, can it be done dynamically e.g. by an expression, variable etc.

 

  

 

Top 25 Contributor
Posts 82
Lex Hegt replied on Sat, Apr 21 2007 12:39 AM

Hi,

The good news is that if you want to pass a binary file to another location, you don't need an orchestration. You simply use Message Based Routing to move the binary.
There are a couple of things you have to beware of:
- to move binaries you 'll have to use the Pass Through pipelines on both the Receive Location and the Send Port
- most convinient is to create another Receive Port/Location

Lex Hegt http://biztalkia.blogspot.com/

Top 25 Contributor
Posts 174
wearsy replied on Mon, Apr 23 2007 6:55 AM

If you can get away without using an orchestration, then go with Lex's suggestion. 

If you do find that you need an orchestration, does the Receive Location's File Mask not provide the level of granularity that you need?  You should be able to put in a file mask that should pick up only the type of file(s) that you are interested in

Kent Weare BizTalk MVP
replied on Tue, Apr 24 2007 3:47 AM

It is because i want to route binary file to a folder based on information extracted from the filename.

I found a usable way to do it. Using passthrutransmit on both the receive and send port, and using XmlDocument as messagetype, it is possible take in a binaryfile in an orchestration leaving it untouched.   

 

Top 25 Contributor
Posts 82
Lex Hegt replied on Tue, Apr 24 2007 6:50 AM
Are you using a dynamic send port in your orchestration? To prevent using an orchestration, it might even be possible to write a custom pipeline component which does the extraction for you.

Lex Hegt http://biztalkia.blogspot.com/

replied on Thu, Apr 26 2007 11:17 PM

I am using late binding (specify later) on my orchestration, and used an expression to extract information from the file name

someMessage(File.ReceivedFileName)  // Filename

Top 25 Contributor
Posts 82
Lex Hegt replied on Fri, Apr 27 2007 1:49 AM


Receiving the file name works fine this way, but to set the outputfilename you need a Dynamic Send Port in your orchestration. Next you use an Expression Shape to set the Base Address on that port. The syntax looks as follows:

SomeSendPort(Microsoft.XLANGs.BaseTypes.Address) = "FILE://SomeFolder/" + YourBinaryFile;

Hope this helps.

Lex Hegt http://biztalkia.blogspot.com/

replied on Thu, Nov 26 2009 11:44 AM

Hi,

Did you find any resolution for the problem?

If so can you please send the details.....

Thanks in advance

 

Page 1 of 1 (8 items) | RSS