locked
How to assign the unique message id to an attribute? RRS feed

  • Question

  • Hi everyone,
    I receive xml files which comply to a certain schema. The source schema is mapped to a destination schema. The destination schema has an "MessageID" attribute. I'd like to assign the unique message id, constructed by biztalk, to this attribute, so that all outgoing xml files have the "MessageID" attribute set. What is the best way to achieve this?
    Regards
    Furtok
    Friday, February 27, 2009 12:20 PM

Answers

  •  A few options I can think of:

    - Use the context accessor functoid to get the message id property from the context http://www.codeplex.com/ContextAccessor
    - If you're using an orchestration you can Distinguish the field on the destination schema, put a default value on the map, then populate it later with the distinguished field from inside the orchestration in a construct
    - Use a custom pipeline component to get the ID from the context and update the contents of the message going through the send port
    Thiago Almeida - http://connectedthoughts.wordpress.com
    • Marked as answer by Furtok Monday, March 2, 2009 8:29 AM
    Saturday, February 28, 2009 4:49 AM
    Answerer

All replies

  • You can assign a GUID to the MessageID attribute to make it unique.

    SHR

    • Proposed as answer by Firas Ammouri Sunday, March 1, 2009 12:31 PM
    Friday, February 27, 2009 8:00 PM
  •  A few options I can think of:

    - Use the context accessor functoid to get the message id property from the context http://www.codeplex.com/ContextAccessor
    - If you're using an orchestration you can Distinguish the field on the destination schema, put a default value on the map, then populate it later with the distinguished field from inside the orchestration in a construct
    - Use a custom pipeline component to get the ID from the context and update the contents of the message going through the send port
    Thiago Almeida - http://connectedthoughts.wordpress.com
    • Marked as answer by Furtok Monday, March 2, 2009 8:29 AM
    Saturday, February 28, 2009 4:49 AM
    Answerer
  • Thank you Thiago,
    I will try the custom pipeline.
    Monday, March 2, 2009 8:29 AM