Breaking message

Home Page Forums BizTalk 2004 – BizTalk 2010 Breaking message

Viewing 1 reply thread
  • Author
    Posts
    • #12911

      hi

      we are using sql adapter in our orchestration

      we areselecting from one db using a stored procedure and a sql adapter of type receive and then resulting message is passed to a sql adapter of type send/recv to insert into a table in remote db.

      now in one go a group of msg comes and if first one is erroneous all message fail to insert in the second db but we want that all other except msg which has error should get inserted

      so what approach we need to take?

    • #12912

      Split the message and send it to Adapter

      • #12913

        how to split message as it requires a enumerator which is not serializable so we need a atomic transaction but in atomic transaction we cannot use sql adapter of type request/response as we need to send break msg to sql adapters of type send/recv

        please do help

        • #12914

          You can split using a C# helper utility class, or just use xpath.
          Xpath can \”peel off\” a node at a time.

          msg2 = xpath(msg1,\”//rootnode/somechildnode\”);

          Neal Walters
          http://Biztalk-Training.com

          • #12915

            and if same combination of childnode is present more than once then what to do ?
            as in our case nodes will be repeated

            • #12916

              I posted something like this in another query this week:

              msg2 = xpath(msg1,\”//rootnode/somechildnode[3]\”);

              the three can be a subscript, but you will have to string together your xpath, something like this:

              dynXpath = \”//rootnode/somechildnode[\” & System.Convert.ToString(myLoopCounter) + \”]\”

              msg2 = xpath(msg1,dynXpath);

              Neal Walters
              http://Biztalk-Training.com

              • #12917

                You need to design your schema in such a way that, the max occurence is set to 1 for each node. This way, all records will be broken up into single xml messages and sent to orchestration.

                As for the condition mapping, depending on the value of message properties, you can divert your message to the respective SQL table using the adapter.

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