Jim Dettman
jimdettman at earthlink.net
Fri Mar 11 07:54:00 CST 2005
John, For e-mail, all you can be sure of is that the SMTP server your talking to got the e-mail and sent it. As for FTP, I log the "conversation" between the two servers to a text file. Once the file transfer is complete, I parse the text file for: "File Transfer Complete" Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of John W. Colby Sent: Thursday, March 10, 2005 12:26 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Transfer complete? How do you tell if a file transfer completes? I am working on a system where we send files to email addresses as attachments, and also FTP them to sites. We also receive Emails with attachments and may need to get them from FTP sites but that is another issue. The client is bring in a brand new software package at their end which gives me an opportunity to rewrite my end as well. I am developing a pair of classes - a transfer job and a transfer job supervisor - that can Email or FTP files from a directory location. The supervisor class of the whole system (which requests the documents) knows whether the file created is going to be emailed, FTPed or both and to where. As documents are created and stored on disk, records about the files are stored in a FileTransferJob table by this supervisor class along with the destination and type of transfer (Email or FTP). The TransferFile Supervisor then loads records from this table where the "TransferComplete" field is NULL, builds TransferFile class instances and saves them in a collection of files needing to be transmitted. Each TransferFile instance is then polled periodically telling it to perform the transfer. If the transfer completes successfully, the TransferFile instance updates it's associated record in the table and unloads itself from the supervisor's collection. The system sends New Claim Notices and Payment Requests (records) from my disability insurance call center software to the client insurer, and receives back from them claim numbers and check information. The issue is how do you determine that an email (or FTP) transmitted correctly. My current rev of the software has problems where the email is "sent" but the email server at DIS was down for backup (for example) and while the documents are sitting out on the disk, the transfer did not complete correctly (no email sent). We are not doing FTPs yet but I foresee similar issues where the destination is not on the internet for some reason and the transfer does not occur. One of the reasons I want to build a generic system like this is that in the event of a failure, the file record TransferComplete field can be set back to null and it will just be re-transmitted automatically. I am currently using a class (C)1998-99 Dev Ashish and Terry Kreft to do the FTP Transfer and I may be able to get feedback from the class on a variety of errors that may occur in their class - the remote site being down may be one of them. Unfortunately their class is poorly (not) documented so it is a problem trying to figure out how it works if something goes wrong. I'm really looking for developers who have done this and can discuss their solutions to this issue. John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com