Overwriting adapter properties

by eliasen 18. september 2007 20:29

Hi

An old collegue of mine asked me if there wasn't anyhow he could overwrite the folder of a send port using the FILE adapter, so that he could decide the entire path of a file that was to be written from within his orchestration.

After all, you can overwrite many things, like SMTP server to be used in the send port or the username and password for an FTP connection. So why not the file folder?

Well, I have investigated it a little bit, and I can't get around to making BizTalk do it.

I tried:

  1. Set the folder on the send port blank, and use the %SourceFileName% as filename and set its value (The FILE.ReceivedFileName property of the message) inside the orchestration. This isn't valid, since the folder path can not be empty.
  2. Set the folder to c:\ and set the FILE.ReceivedFileName property to be <directory> + "\\" + <filename>. This didn't work either. When writing the file, BizTalk strips all folder names from the FILE.ReceivedFileName value and just wrote the file with filename in c:\

Off course, you can use a dynamic port to do it, but this customer wanted to avoid seeing all those subscriptions in the subscription viewer.

So I don't see a way around it. And basically, when you know it works like this, it makes sense that the administrator who has decided what folder files go into also gets to decide that you can not overwrite this. Oh well, that's life.

Hope this helps someone at some point...

--
eliasen

Tags:

BizTalk 2006

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

About the author

Jan Eliasen is 37 years old, divorced and has 2 sons, Andreas (July 2004) and Emil (July 2006).

Jan has a masters degree in computer science and is currently employed at Logica Denmark as an IT architect.

Jan is a 6 times Microsoft MVP in BizTalk Server (not currently an MVP) and proud co-author of the BizTalk 2010 Unleashed book.

BizTalk Server 2010 Unleashed


Buy from Amazon

Microsoft MVP


6 times: July 2004, July 2008, July 2009, July 2010, July 2011, and July 2012. Not currently an MVP.

MCTS

Image to show

Month List

Page List