Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Dynamically create send location folder
- This topic has 4 replies, 1 voice, and was last updated 9 years, 7 months ago by
community-content.
-
AuthorPosts
-
-
May 13, 2008 at 12:55 AM #19625
Morning
Is it possible to dynamically create a folder from an Orchestration where the incoming messages can be saved (send location) or does the folder have to exist?
Byron
-
May 13, 2008 at 2:58 AM #19628
you can have .Net dll file called from BTS to create dynamic folders. Store the results in properties and use it for dynamic sending
-
May 14, 2008 at 9:11 AM #19644
In an expression shape, you can call C# and do almost anything you want. But the question is whether that fits in the “spirit” of BizTalk and what you are trying to accomplish with BizTalk. You can write to a file or save a file in C#, but then it doesn’t go through the MessageBox database, people cannot subscribe to it, and it is not logged.
BizTalk built-in features allow you to specify a dynamic filename, but normally, I don’t think you can change the folder name from the one givein in the SendPort (if you are using the regular Send Shape to a regular Send port).
Neal Walters
-
May 14, 2008 at 9:30 AM #19645
Hi Neal
Thanks for the reply.
I found this example which has an example on how to dynamically set the port location.
http://www.codeproject.com/KB/biztalk/DynamicRouting.aspx
What I wanted to know is, if the folder that has been set dynamically in this port does not exist can you create it. I think I have found the solution to this but have not tested it yet.
Byron
-
May 31, 2008 at 8:57 AM #19823
You are best off checking if the folder exists, via some .Net code, before you try to write the file. Otherwise, you will end up with warnings(and eventually a failure) indicating that the folder does not exist. Now there are ways through Delivery Notification to catch these type of failures then create the folder after it has errored out, but it is just easier to do this work before hand.
If by chance you are using FTP, check this link: http://kentweare.blogspot.com/2008/04/ftpwebrequest-class-creating-remote.html
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.