处理 BizTalk 2010 解决方案中的所有异常和失败消息
我有一个 BizTalk 2010 解决方案,它轮询数据库表、检索未处理的记录、使用地图进行转换并调用第三方服务。幸福之路正在发挥作用。
工作流程如下:
- 从 GetUnprocessedCustomers 存储过程接收位置/端口:通过调用返回未处理客户的存储过程,使用 WCF-SQL 适配器轮询 SQL Server 2008 (WHERE IsProcessed = 0)
- SendPort 到第 3 方 Web 服务:过滤为 ReceivePortName == with一个出站映射,用于将从上述存储过程返回的消息转换为服务架构
- SendPort 到 UpdateIsProcessed 存储过程:过滤为 MessageType ==,并使用出站映射将服务响应转换为将更新 IsProcessed = 1 的存储过程调用。
我想捕获以下可能的异常,创建包含异常信息的消息并调用内部异常处理服务。
- 数据库或存储过程不可访问。
- 无法访问第 3 方服务。
我能够通过启用失败消息路由来处理上面的问题 2。感谢 Greg.Forsythe。
我的问题是: 如何创建一个通用解决方案来捕获所有异常并将异常信息(例如异常日期时间、消息、堆栈跟踪等)发送到内部服务?
I have a BizTalk 2010 solution that polls a database table, retrieves unprocessed records, does a transform with a map and call a 3rd party service. The happy path is working.
Here is the workflow:
- Receive Location/Port from GetUnprocessedCustomers stored procedure: Poll SQL Server 2008 with WCF-SQL adapter by calling stored proc that returns unprocessed customers (WHERE IsProcessed = 0)
- SendPort to 3rd Party web service: Filtered to ReceivePortName == with an outbound map to convert message returned from the above mentioned stored proc to service schema
- SendPort to UpdateIsProcessed stored proc: Filtered to MessageType == with an outbound map to convert service response to stored procedure call that will update IsProcessed = 1.
I would like to catch the following possible exceptions, create a message with exception info and call an internal exception handling service.
- Database or stored procedure is not accessible.
- 3rd party service is not accessible.
I was able to handle number 2 above by enabling Failed Message routing. Thanks to Greg.Forsythe.
My question is:
How can I create a generic solution that will capture all exceptions and send exception info (such as exception datetime, message, stack trace etc.) to an internal service?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我能够在 BizTalk 综合论坛。简短的回答是“没有办法捕获所有异常”。点击链接查看一些选项。
I was able to get an answer on the BizTalk General Forum. The short answer is "There is no way to catch all exceptions". Hit the link for some options.