EBIFour.com > Training > Clarify Tips > Best Practices – FTP Adapter Reprocessing

Best Practices – FTP Adapter Reprocessing

29th June 2016

Sean Hoppe Consulting Group

If you do FTP processing, either through FTP, SFTP, FTPS, or FTPES, your trading partner’s FTP server may be down when you need to connect to it.  Perhaps it is down for service, or even temporary unavailable due to a network issue, your adapter could fail only after one attempt to connect, which can fill your Auditor with failed logs.

Don’t let your process fail because of these minor issues.  Configure your FTP Adapters and Business Processes to perform multiple attempts over a desired amount of time until your data is placed successfully.

In the screenshot below, we have a sample Business Process, in our example, using an SFTP Put Adapter.

FTP Adapter Reprocessing Business Process Best Practice

In our process example, the Tasks in the Business Process Script begin, and continue to the SFTP Put Adapter.  If the adapter is successfully able to Put the data to the FTP Server, it passes and moves to the Success SetExitStatus task at the bottom of the script.  However, if it fails, it moves onto a Sleep task.  That Sleep task is designed to wait a few moments before eventually attempting to reprocess again.  The next task is the Add task.  Here, we have a simplistic counter configured using variables and adding values, which we compare in the next task using CompareValues.

We compare the values against the maximum number of attempts you wish to perform.  For our example, we’ll use 5 attempts before we fail the process. However, you are able to continue for any number of times.  The first time this passes through the CompareValues task, we’re perhaps comparing 1 (counter value from the Add task) with 5 (maximum number of attempts).  If it does not equal those values, we start back to the SFTP Put Adapter, labeled Sftp.

The second time this fails, we allow the Sleep timer to pause for any particular amount of time, before adding 1 to our counter, which was a value of 1, which our new value is 2.  We use CompareValues again to compare 2 (new counter value from the Add task) with 5 (once again, our maximum number of attempts).

This process continues until 5 attempts have been made, in our example, and the counter number matches the maximum number of attempts.  If no connection is made, the process can send you an email and fail the process.  Or, in our example, use a StandardError Business Process, which will contain an email regarding the value and to also fail the process.

Custom processes can loop throughout your process until it is successful, or inevitably fail if you decide to not continue reprocessing over several hours.  However, allowing the Sleep task to pause for several minutes, may increase your chance of successfully connecting to the FTP Server if there is a network issue.


By: on