BizTalk – Rename Output File Based on Some Attribute in Orchestration

  1. Create an Orchestration string variable (in this case testVAR)
  2. Add assignment shape with code below
  3. Change the send location output file name to %SourceFileName%

    [sourcecode language=”csharp”]
    outputMessage = outputMessage ;

    testVAR = xpath(outputMessage,"string(/*[local-name()=’SomeName1′ and namespace-uri()=’SomeSchema’]/*[local-name()=’SomeName2′ and namespace-uri()=”]/*[local-name()=’SomeName3′ and namespace-uri()=”]/text())");

    outputMessage(FILE.ReceivedFileName) = testVAR + ".TXT";
    [/sourcecode]

     

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.