Automic Workload Automation

  • 1.  File Transfer Object with Retry

    Posted Mar 07, 2019 06:09 AM

    Good Morning

     

    We are currently still on V9 of Automic  (undergoing migration to v12 later on in the coming months)

     

    We have a File Transfer Object which uses in house common retry code, as we did not see any option/parameter on the File Transfer object to activate a retry when it ended with an error.

     

    What we are finding is that if the File Transfer object errors ENDED_NOT_OK, it will kick off itself in Retry which also ends with ENDED_NOT_OK, so it will go into retry again, and what we are finding is that on the 2nd retry of the File Transfer object it is failing the error:

     

    Activation error in file transfer 'MID.JOBF.FILE_DIRECTOR.V2.FILE_TRANSFER'. Last restart is still active.

     

    We are not sure that we understand this error, as the original File Transfer object ENDED_NOT_OK, and its 1st retry object ENDED_NOT_OK, which implies that the objects are no longer active.

     

    So how is the 2nd Retry object giving the error shown above.

     

    Any thoughts would be much appreciated

     

    Thank you all



  • 2.  Re: File Transfer Object with Retry

    Posted Mar 08, 2019 09:39 AM

    Can you share whats the runtime of these jobs ?

     

    Most likely if you see this error i assume that the job is still not read as complete by UC4.

    I assume the successive restarts are in quick time frame.

     

    I would just try to add some wait time before the auto- restart of the object to see if that solves the problem.



  • 3.  RE: Re: File Transfer Object with Retry

    Posted May 04, 2020 11:30 AM
    Hi

    Thank you for replying.

    Below is a snippet of teh code in the JOBF Post Processing tab. The wait time is 60 seconds, which is passed down from teh calling JOBP. 
    We did an experiment with a JOBP calling a  JOBS that returns an error, with its Post Processing containing the same code as below, and that worked, as in it retried as expected. 


    :SET &Z_RETRY_RUNNR# = SYS_ACT_RESTART_ME_NR()
    :SET &Z_RETRY_ORUNNR# = SYS_ACT_ME_NR()
    :SET &Z_RETRY_PTYPE# = SYS_ACT_PARENT_TYPE()
    :SET &Z_RETRY_PRNR# = SYS_ACT_PARENT_NR()
    :SET &Z_RETRY_PNAME# = GET_PARENT_NAME(, &Z_RETRY_ORUNNR#, "ACT")
    :SET &Z_RETRY_NAME# = SYS_ACT_ME_NAME()
    :SET &Z_RETRY_STATUS# = GET_UC_OBJECT_STATUS(,&Z_RETRY_RUNNR#)
    :SET &Z_RETRY_RET# = GET_UC_OBJECT_STATUS(,&Z_RETRY_RUNNR#,RETCODE)

    :WAIT &Z_RETRY_WAITTIME#

    :PRINT &&Z_RETRY_RUNNR# = [&Z_RETRY_RUNNR#]
    :PRINT &&Z_RETRY_ORUNNR# = [&Z_RETRY_ORUNNR#]
    :PRINT &&Z_RETRY_PTYPE# = [&Z_RETRY_PTYPE#]
    :PRINT &&Z_RETRY_PRNR# = [&Z_RETRY_PRNR#]
    :PRINT &&Z_RETRY_NAME# = [&Z_RETRY_NAME#]
    :PRINT &&Z_RETRY_STATUS# = [&Z_RETRY_STATUS#]
    :PRINT &&Z_RETRY_RET# = [&Z_RETRY_RET#]
    :PRINT &&Z_RETRY_WAITTIME = [&Z_RETRY_WAITTIME#]

    :IF &Z_RETRY_STATUS# = "1800"
    : IF &Z_RETRY_RETRIES# < &Z_RETRY_MAXRETRIES#
    : SET &Z_RETRY_RETRIES# = &Z_RETRY_RETRIES# + 1

    : SET &Z_RETRY_RESTART# = RESTART_UC_OBJECT (&Z_RETRY_NAME#,&Z_RETRY_ORUNNR#)
    : PRINT &&Z_RETRY_RESTART# = [&Z_RETRY_RESTART#]
    : ENDIF
    :ENDIF