cancel
Showing results for 
Search instead for 
Did you mean: 

FTP and content trigger timing

mzm2lh
Champ in-the-making
Champ in-the-making
I have a content rule that triggers when any new files arrive in a folder.  I am using FTP to deposit files into this folder, and in a single FTP session I am putting a set of files and then getting them (and comparing checksums) for purposes of ensuring their successful transfer.  I am doing this partly because it is easier and more reliable than parsing the FTP log.  I want to be sure that my content rule triggered-script doesn't run before the FTP get completes, because it ultimately removes files from the drop folder.  Can I assume that the content trigger will not fire until the FTP session disconnects?

Thank you for your answer, or suggestion, or reference to relevant documentation.
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
No you can't.

The FTP session is not transactional.   So individual PUT commands will commit during the session, and therefore trigger rules.

I don't think it should be neccessary to "checksum" files, have you ever had a repeatable test case where it would have made a difference?

mzm2lh
Champ in-the-making
Champ in-the-making
I haven't personally had a problem, I am just trying to respond to a requirement to produce evidence that files are successfully transmitted.  Is there a better way to do this? 

There may be another flaw in my scheme, because I am advised that Alfresco will rename (add a suffix to) incoming files if a file by the same name already resides in the drop folder.  I haven't seen this documented anywhere, but if true it would certainly mess up my approach.

The only other thing I can think of doing is capturing and parsing the ftp log (kind of clunky).

Your advice is very much appreciated.

mrogers
Star Contributor
Star Contributor
No alfresco will not rename files.

I'd expect FTP over TCP to be reliable.   If your FTP client says that a put was successful then I'd believe it.    (And if that's not the case then lets have a JIRA please.)

People also use SMTP for this type of requirement.    That may or may not be an option.