Automic Workload Automation

 View Only
  • 1.  Change the status of FTP job to success

    Posted 17 days ago

    Hi All,

    We have a FTP job configured to cancel the transfer when file already exists at the destination. So, if 1 out of 5 files is already present then remaining 4 will be transferred but the job will be in aborted state. 

    I want to change the job to ended_ok state in this scenario. I have tried 'prep_process_report' in post process but it is not working.

    Thanks



  • 2.  RE: Change the status of FTP job to success

    Posted 14 days ago

    Hi Himanshi, 

    I'm not entirely sure about your specific use case. You could opt to overwrite the file if it already exists. Alternatively, if you wish to adjust the return code in the scenario where the file exists on the target, you could utilize the "output filter." Please refer to the screenshot:



    ------------------------------
    Regards,
    Arun Verma
    ------------------------------



  • 3.  RE: Change the status of FTP job to success

    Posted 13 days ago

    Hi Arun,

    Thanks for your response. It is not working since the return code of job is 0, even if I apply the filter and change it to >0, it will still remain in ended_not_ok state. This is the same reason why prep_process_report is not working.

    Return code with filter:

    Return code without filter:

    Thanks




  • 4.  RE: Change the status of FTP job to success

    Posted 13 days ago

    Hi Himanshi,

    Could you please share the directory download of report for this execution and the XML export of the object after omitting any specific information? Additionally, information on the AE version and Agents version would be helpful.



    ------------------------------
    Regards,
    Arun Verma
    ------------------------------



  • 5.  RE: Change the status of FTP job to success

    Posted 13 days ago

    I was able to reproduce it, and in this scenario the "output scan" is still able to update the job status to ended ok.

    With output-filter (return code kept as 0):




    ------------------------------
    Regards,
    Arun Verma
    ------------------------------



  • 6.  RE: Change the status of FTP job to success

    Posted 19 hours ago

    Hi Arun,

    Thank you, it is working with return code 0 but was not working with return code 5.

    Thanks




  • 7.  RE: Change the status of FTP job to success

    Posted 13 days ago

    Hi Himanshi,

         I'm not sure what your post processing looks like, but we use the following bit of script to change the status of file transfer jobs depending on the return code:

    ! Get the return code
    :SET &rc# = GET_STATISTIC_DETAIL(,RETURN_CODE)

    !If the return code is equal to 1, consider this a normal end of job
    :IF &rc# = 1
    :      MODIFY_STATE RETCODE=0
    :    ELSE
    :ENDIF



    ------------------------------
    Christine Bauder
    Assistant Director of Production Services
    University of Colorado
    Colorado
    ------------------------------



  • 8.  RE: Change the status of FTP job to success

    Posted 13 days ago

    Hi Christine,

    The return code of failed job is also 0 in this case that is why prep_process_report is not working.

    Below is the output without any post process script or output filter by selecting the option of cancel transfer in case file exists at destination: