Within each of the standard BPs that provides for error handling, at the lower right margin of the main scope is a Catch Named Exception activity, connecting it to a scope containing an instance of a B2B protocol process: ErrorHandlerSelector. See Figure 3–4.
If you open the ErrorHandlerSelector BP, you find that by default, it uses JMS for handling errors, mapping fields under the ErrorHandlerSelectorRequest’s errorEvent container to the handleError.Input’s ErrorHandler container. See Figure 3–5.
The purpose of the JMSErrorHandler B2B protocol process is to send error messages to JMS, using the ErrorEvent_ErrorEventType OTD. However, in place of JMS, you could substitute SMTP to e-mail the text of the error message or FTP to write it to a file on a remote server. To create an SMTP-based error handler, for example, you would follow these steps:
In the Error Management folder, create a new B2B protocol process and name it; for example, SMTPErrorHandler.
Open the properties of SMTPErrorHandler and do the following:
Drag activities onto the Protocol Designer canvas for SMTPErrorHandler and connect them.
Configure business rules in the same way as for JMSErrorHandler.
After you have created a new error handler, you can go back to ErrorHandlerSelector and replace JMSErrorHandler with the new error handler, for example, if you wanted AS2OutboundChannelManager to deliver error messages via SMTP instead of JMS.
In the same way, you can add or modify other components in the B2B Templates folder, making them part of the toolset used by eeXchange Integrator projects in this Repository.