Handling Transport/Channel Errors: (FTP/HTTP/SMTP/AS2)

In my previous blog entry I discussed some of the frequent points of failure in a B2B transaction. Let me explain how the Mond Cloudware framework can address these challenges. Let’s consider implementing a simple FTP client that can connect to an external FTP server or an EDI VAN, get the list of X12 documents, read each file, delete a file and write a file to the FTP server. Using existing API’s a programmer (in any language) could probably implement these in a few hours. Now add ‘Industrial Strength’ error handling including document storage else where in case of errors, retry mechanism , meaningful email notification, file name generation and quickly the few hours turn into a few days of development and few additional days of testing.

A functional analysts/programmer can handle each of the above tasks using Mond Cloudware. The typical tasks include:

1)      Define a FTP/SFTP/FTPS channel. Define the usual parameters like host/userid/password/directory etc.

2)      Define the retry count , interval and factor, the email channel to be used etc.

Using the Mond Script Engine, when you invoke an FTP operator like Get List Of Files, or Put File, Mond automatically retries the FTP operation in case of an error. Each successive iteration takes a progressively longer time, because it makes no sense to keep retrying say every 1 minute. If at the end, the operation is still not successful, the email channel is used to notify the relevant users about the error. The inbound document can be stored in the Mond Datastore, along with a set of unique attributes to identify this document later on.

Every operation is also automatically logged, so you know what went all, how many files were found on the FTP server, how many were read, how many processed, how many deleted, without writing a single line of code. An added bonus is that you get the metrics like time taken for each operation. This way, you also get to monitor the response time without additional coding.

The pseudo code for such an operation could be :

Get File Count Using FTP Chanel

Loop Over File Count

    Read next file using FTP Channel

    If FTP Response OK

      Store Document

    Else

      Send Email

    Delete File

End Loop

An actual Mond project code is shown below:

Mond FTP Code

Mond FTP:

About Bala

Bala Vishwanath(bala@connectglobalone.com) is cofounder and CTO of ConnectGlobalOne, the Semantic Cloud Integration company. Bala is an expert in designing, developing and managing large multi year, multi location, multi-tenanted products. For more information visit http://www.connectglobalone.com
This entry was posted in Product Tips and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>