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%
    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";


Leave a Reply