开发者

BizTalk 2006 R2 schema validation specific error message with failed message routing

开发者 https://www.devze.com 2023-02-27 20:06 出处:网络
I\'m looking for a way to catch the actual exception thrown by BizTalk 2006 R2 when a receive port can\'t parse a message it picks up.

I'm looking for a way to catch the actual exception thrown by BizTalk 2006 R2 when a receive port can't parse a message it picks up.

For example, I have a csv file that was not properly created, say it's missing a comma, so when BizTalk tries to determine the message type, it errors out. Without using failed message routing, there are 2 entries in the application event log. One has a pretty generic error description, something along the lines of "The Messaging Engine encountered an error during the processing of one or more inbound messages." The second entry has what I'm looking for. It will contain the details of where the missing comma is, something along the lines of "Unexpected data found while looking for: ',' The current definition being parsed is POSTrailer. The stream offset where the error occured is 44443. The line number where the error occured is 244. The column where the error occured is 1."

I've tried using the ESB toolkit Exception Handler for BizTalk 2006 R2. Using failed message routing and their exception handing framework, the error description it catches is the first, generic, error description.

I do not see any way to obtain the second, more detailed error description. I'm assuming somewhere in the bowels of the biztalk messaging engine this exception is getting thrown, which is caught by something a little bit higher in the process, which throws it's own generic biztalk exception. I would also assume that the more specific error description is contained as the inner exception of the exception that gets routed to the ESB toolkit, however by the time I can get a hold of it, as far as I can tell, the actual exception object has been replaced by the message context, which is nothing more than a bunch of name/value pairs. The error description is now the generic one that is not helpful, and anything resembling an inner exception is just a hexidecmal code, which means nothing to my end users.

Everything I've found regarding obtaining a specific error message deals with exceptions thrown from an orchestration. I am not dealing with an orchestration, though, I'm dealing with a receive port. The closest thing I can find is here. But even if I could create a custom pipeline component using that, that means I either need to add that component into every exising custom pipline, or create a new one to validate XML and use that instead of the XMLRecieve or XMLSend pipelines that come with BizTalk... That also means trapping errors generated from EDI is out of the questio开发者_运维技巧n. Does anyone know of a way to get at this more detailed error description from the BizTalk generated error message?


I'm not sure of a tool that will do exactly what you're looking for, but I do have a couple of options.

1) I'm pretty sure SCOM can grab those errors and alert whoever needs to be alerted. I've had some problems with this in the past, though, so it may not be your best bet.

2) For basic Failure handling, you can write code to scrape the EventLog for any warning or error from BizTalk and pass that down the line (my current client does this- it's not super elegant, but it works well).

3) What I would encourage- if you don't want orchestrations- is to set up custom pipelines which simply implement your error handling/monitoring in addition to your normal operations. Then, for non-critical messages, you can still use the standard pipelines (reducing overhead/latency) and for critical messages you can use your "GuaranteedDeliveryPassThruPipeline" or your "GuaranteedDeliveryXMLTransmitPipeline" or whatever.

0

精彩评论

暂无评论...
验证码 换一张
取 消