Dynamically create send location folder

Home Page Forums BizTalk 2004 – BizTalk 2010 Dynamically create send location folder

Viewing 2 reply threads
  • Author
    Posts
    • #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

    • #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

    • #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

      • #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

        • #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

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