开发者

Catching FTP Receive Connection Exceptions in BizTalk

I have a BizTalk demo connecting to an FTP server.

However, there are various exceptions that can occur such as:

  • The server may be unavailable
  • The username/password may change
  • File deletion after downloading may not work due to permissions etc.

These generate exceptions in the Error Log.

However, I can't see any easy way for me to handle these exceptions beyond

  1. Writing a custom WMI adapter to poll the Error Log and try and match exceptions based on adapter name.
  2. Using the Log functionality of the FTP adapter and parsing the log file for FTP exceptions.

Solutions on the internet seem to revolve around enabling "Failed Message Routing" or using the ESB Exception Handler. However, I believe both of these require actual messages, which there won't be if the adapter encounters an exception and fails to connect.

One possibility I've considered, but don't think is possible, is dynamically doing a "receive" in an orchestration, and catching exceptions there - is this possible?

If not, is 开发者_StackOverflow社区there any way to catch an exception thrown by a receive adapter before messages are collected?

Thanks!


BizTalk will "handle" these exception cases by eventing an error and shutting down the receive location. This is normal and I think very reasonable behavior.

In this instance BizTalk has not stopped working. Other methods of receiving messages into the receive port will continue to work.

I am not sure what kind of handling you have in mind? There are plenty of ways you can monitor an event log.

What do you want to happen as a result of the exceptions?

In answer to your other question, you can "dynamically do a receive" by calling a .net component from an orchestration. You could have an orchestration which looped around an expression shape which "polled" the FTP server. In this case you would certainly have access to regular exception handling mechanisms.

PS. You are correct that failed message routing relies on there being a message. For example if an inbound message failed during pipeline processing.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜