BizTalk Gurus

Add Meatadata to received message

Latest post 05-14-2008 5:55 AM by greg.forsythe. 5 replies.
  • 05-13-2008 2:12 AM

    • byron
    • Top 75 Contributor
    • Joined on 04-15-2008
    • Johannesburg
    • Posts 18

    Add Meatadata to received message

     Hello

     

    Is it possible to add information or meatadata to a message that has been received and is currently being processed, or would I need to create a new message based on the received one to add additional information?

    I am retrieving files(.EML & .TIFF) from various receive locations and adding them to a central location on a local server before processing them. What I am thinking of doing is adding the receive location information to these messages so I can priorize the processing of them.

     

    I am very new to BizTalk so if this does not seem to be the best solution I would appreciate any feedback.

     

    Thanks in advance

    Byron

  • 05-13-2008 4:54 AM In reply to

    Re: Add Meatadata to received message

     All messages that pass thru Biztalk are made of two components, the message context and the message body.

    The context is a dictionary of properties. These can be promoted properties (less than 256 byte) that can be used for routing and non-promoted properties (any length).

    Each type of adapter will add properties about the receive location etc, pipeline components will add properties (e.g. XML disassembler will promote properties and distinguished fields defined in the messages schema). You can declare and use your own properties by defining a property schema, and promoting the properties in a custom pipeline component or within an orchestration.

    The question for you is how to use this information once the message exits Biztalk and is stored in your central location. If you are storing in a database, then you could add a column to the table to hold receive location information. If storing in a file location you could potentially use a dynamic send port to store in an directory appropriate directory tree. You could even use some other features of Biztalk to manage message priorities?

    Can you explain a bit more about the problem you are trying to solve?

     

  • 05-13-2008 5:53 AM In reply to

    • byron
    • Top 75 Contributor
    • Joined on 04-15-2008
    • Johannesburg
    • Posts 18

    Re: Add Meatadata to received message

     Hi Greg

     

    Thanks for the response.

     

    We have about 60 remote locations(satellite branches) that will be scanning documents to a shared folder on their server. I am going to need BizTalk to poll those folders and move theses files with a FILE adapter and a PassThru Pipeline to a central file repository on out server at head office.

    Some branches will have a higher amount of scanned documents so these will need to have a higher priority, but I have been advised you are unable to prioritize Receive Locations. In trying to find a solution to this I thought that during the transportation from the branches I would add some information to the message context that will enable me to prioritize the processing of these messages in the next step.

    In the next step I would use an orchestration to read the updated message context to process these messages according to priority and call a .NET Class to insert into Oracle database.

    As I said before I am new to BizTalk and this is my first project so this may not be an ideal way to work with BizTalk so any recommendations would be welcomed.

     

    Thanks

    Byron 

  • 05-13-2008 3:46 PM In reply to

    Re: Add Meatadata to received message

    One problem you will face is prioritizing the orchestration.

    A possible solution, use the MSMQ adapter. In the receive pipeline have a custom pipeline component that sets the MSMQ.MessagePriority based on the the receive location, create a MSMQ send port to subscribe to these messages. Have a MSMQ receive location to read this queue. Your orchestration will subscribe to the MSMQ receive location and messages will be processed in priority order. The Orchestration could use an Oracle adapter send port to update the Oracle  database.

    The only .NET code is the pipeline component, and the messages are managed either within the MessageBox database (if you use MSMQT adapter) or in the MSMQ message store if you use the MSMQ adapter

     

     

  • 05-14-2008 1:18 AM In reply to

    • byron
    • Top 75 Contributor
    • Joined on 04-15-2008
    • Johannesburg
    • Posts 18

    Re: Add Meatadata to received message

     Hi Greg

     

    Thanks for the suggestion, can you use a MSMQ adapter to move and process a normal TIFF or EML file, I thought that you would need to use a FILE Adapter?

     

    When the TIFF file has been moved to the central location will the message context automatically have the information about the receive location associated to it? 

     

    Byron

  • 05-14-2008 5:55 AM In reply to

    Re: Add Meatadata to received message

    The MSMQ adapter can handle many message types. This adapter has a Body Type property to specify the message content. This uses the .NET VarEnum enumeration. The default setting is 8209 (0x2011) which is a byte array.  

    The message context only exists inside of Biztalk, once you send it via an adapter the message context remains in Biztalk.

    There are various techniques to propagate context information.

    With SOAP messages you can create custom SOAP Headers( or a SOAP message with MTOM attachments-with 2006 R2 and WCF)
    You can also use MIME multipart messages and add context properties to a message part.

     

     

Page 1 of 1 (6 items) | RSS