Home Page › Forums › BizTalk 2004 – BizTalk 2010 › A way to determine the failing node during routing error
- This topic has 5 replies, 1 voice, and was last updated 9 years, 2 months ago by
community-content.
-
AuthorPosts
-
-
July 22, 2008 at 3:05 AM #20198
Hello,
I’m using a simple setup: When reading an XML-file I compare it to an XML-schema (in a pipeline) in the receive port. I want to know which line or node is responsible for the failure whenever a file is rejected by the pipeline. Is there a way to achieve this ?
Background: There could be big files coming in. The customer wants to have a simple way to find the error whenever one occurs.
The same goes for a schema I send to an SQL-endpoint (for inserting into a table) which responds with an error-message. There’s this node named “sqlmessage:LineNumber” in it, but it’s always ‘1’. I guess this is because the whole statement is just one line. How can I get a more descriptive message ?
I hope you can help me, this is urgent !
Regards, Michael
-
July 22, 2008 at 3:26 AM #20200
Michael,
I don’t believe there is any way to get this kind of information out of the box with BizTalk because of the way that the disassembler works. However, you could write your own Receive Pipeline component to validate the message against the same schema and use that to provide further information for debugging purposes.
Bear in mind though that you will need to write this in a streaming manner to ensure maximum efficiency (given that you will be processing large files) and you will be duplicating the work (and therefore overhead) of the standard XmlDisassembler.
An easier approach may be to route the failed message to an external directory and write a Windows Service (or exe that is invoked by a scheduled task) that collects ‘failed’ messages and produces a more accurate overview of where the failure is – this will ensure that you have the most efficient BizTalk pipeline and also a detailed error for debug purposes, working on only those messages that have failed validation.
HTH, Nick.
-
July 22, 2008 at 4:13 AM #20203
Nick,
thank you very much for your quick reply. It’s what I suspected, but it’s good to be sure. The idea of using a service hits the spot – we have to stay fast as long as no error occurs.
Regards, Michael
-
July 22, 2008 at 6:13 AM #20206
Hey, I found something interesting: The routable NAck Message is way more descriptive than I remembered ! This should make our customer happy. Now I just need to find a trick to synchronise the names of the original file and my NAck. I’ll try routing the messages through an orchestration tomorrow.
Any better ideas ?
-
July 22, 2008 at 6:20 AM #20208
For the synchronisation, could you not read the context and determine the original filename?
-
July 22, 2008 at 10:28 PM #20217
Yes, that’s easier than my complicated way. I wanted to generate a unique name using the MessageID of a message from my main orchestration, but I guess I’ll go with your solution. Thanks again !
Regards, Michael
-
-
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.