Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Breaking message
- This topic has 6 replies, 1 voice, and was last updated 9 years, 2 months ago by
community-content.
-
AuthorPosts
-
-
February 17, 2006 at 12:34 PM #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?
-
February 17, 2006 at 1:17 PM #12912
Split the message and send it to Adapter
-
February 18, 2006 at 5:35 AM #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
-
February 22, 2006 at 5:44 PM #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-
March 2, 2006 at 10:06 AM #12915
and if same combination of childnode is present more than once then what to do ?
as in our case nodes will be repeated-
March 2, 2006 at 3:58 PM #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-
March 2, 2006 at 12:02 PM #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.
-
-
-
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.