Outgoing Message Verification And Adding Message Context Information

Home Page Forums BizTalk 2004 – BizTalk 2010 Outgoing Message Verification And Adding Message Context Information

Viewing 1 reply thread
  • Author
    Posts
    • #24880

      Hi All,
      I am new to this forum and new to Biztalk too. Currently I have started exploring Biztalk Server 2009 and ESB Toolkit 2.0. I have completed basic understanding of Biztalk server and able to develop some examples.

      The following two items I am currently looking are,

      First,
      I want to achieve some validation of incomming message, specifically I have flat file with multiple lines of records. Each line consists of 3 columns where column 3 is the some of first and second column. I want to verify that 3rd column is the correct sum of first and second column.

      Second,
      I want to including context information to the content of the output message, where we want to include the outgoing file name in the message content.

      No Idea how will I achieve these, Please guide me if any one has any suggestion. Any help in this regards will be highly appreciated.

      Regards,
      Netsan [:)]

    • #24974

      If you’re in an orchestration you can get/set a message receive file name using the FILE.ReceivedFileName context.

      //Get example

      varFileName = msgMyMessage(FILE.ReceivedFileName);

      //Set example

      msgMyMessage(FILE.ReceivedFileName) = “MyNewFilename”;

      If you’re trying to write to the message context in a pipeline then you can do something like this:

       

      IBaseMessagePart bodyPart = inmsg.BodyPart;
      Stream ediStrm = bodyPart.GetOriginalDataStream();

      string destinationParty “ACME”;

      //Now promote destinationParty
      inmsg.Context.Promote(“DestinationParty “, “http://Destiny.PropertySchema”, destinationParty);

      Explanation:

      inmsg.Context.Promote(<Property Field>, <Property Schema>, <Value being promoted>);

      Note, you will need to create a property schema, and add DestinationParty to the schema

      hope this helps

       

      • #25031

        Thanks for the reply,
        I will try the approach suggested and let the community know, how it goes.

        Thank you for your help.

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