Automic Workload Automation

  • 1.  FTP agent - polling for files - static vs wildcard

    Posted Sep 24, 2014 01:38 PM
    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?


  • 2.  FTP agent - polling for files - static vs wildcard

    Posted Sep 26, 2014 12:39 PM
    My technique is to set up my ftp pole job to be the first task in the workflow that processes the file.  The pole job modifies the return code to 0001 if the file is not found on the report.  His runtime tab says return code of 0001 is acceptable.  And there is a post-condition rule that says to restart the pole job in x-minutes if return code is 0001.   I'm not getting any hard failures with this technique.