FTP agent - polling for files - static vs wildcard

Discussion created by Daryl_Brown_218 on Sep 24, 2014
Latest reply on Sep 26, 2014 by Peter WIRFS
I've been working with FTP agents for a while here, and wanted to get the community's input...

I'm working on a workflow containing an FTP job to poll a remote sftp site for files matching &REMOTE_FILE_FILTER#.  Whenever it finds such file(s), it should do a UC_ACTIVATE_OBJECT on a separate workflow to download and process that file.
So the FTP job is fairly straightforward -- I do a 'List Directory' command on the Ftp tab, and then process the resulting filenames on the Post Process tab using PREP_PROCESS_REPORT.

Now, if &REMOTE_FILE_FILTER# is a value containing a wildcard -- e.g., "abc*.txt" -- then the FTP job finishes in ENDED_OK regardless of whether or not it finds any such files, which is fine.  But if &REMOTE_FILE_FILTER# doesn't contain a wildcard -- e.g., "abcdef.txt" -- and it doesn't find the file, then the job errors out (ENDED_NOT_OK), with the job throwing a lovely java error starting with "com.uc4.ftpjob.DataTransferException: No such file".

Now I'm not convinced that the second scenario should really be throwing an error in the first place -- ideally, I only want this job to blow up when it fails to connect to the remote site -- but given that it does, what does the community-at-large suggest as the best way to negate this error?
  • Use the Post Process to search for "No such file" and reset the return code to 0 if found?
  • Add an 'If Failure' clause to the Ftp tab to address this?  (I'm not sure if this would actually work; I haven't played much with the 'If Successful' / 'If Failure' commands.)
  • Make sure I always use a wildcard character in &REMOTE_FILE_FILTER#?
  • Convince Automic that this is a bug to be fixed?  ;)
Any other ideas / thoughts?