BizTalk how to use same message inside and outside loop

  1. Create two Orchestration messages of same type. In this case I refer to them as Message1 and Message2
  2. Create a Orchestration variable of type System.Xml.Document. Tn this case I refer to it as xmlDocument
  3. Construct Message1 outside, before the loop with a Transform ect.
  4. Inside loop, within a single Construct Shape:
    1. Assign xmlDocument to Message2
    2. Manipilate Message2
    3. Assign Message2 to xmlDocument
  5. Outside, after the loop, assign xmlDocument to Message1
  6. Return Message1