Automic Workload Automation

 View Only
  • 1.  Trying to get "External Task Name" & "Main job plan name" if certain "External task" crossed "Time Out" duration.

    Posted Jul 05, 2019 02:56 AM
    Hello Everyone, 

    We have selected one script to get triggered by the job plan's External Dependency property ( more details on the screenshot ).
    That script prints the "main job plan Name" & it's "RUNID" saying it is running long as one of the external is waiting for long. 

    SCRIPT NAME : SYSTEM.SCRIPT.X.UC4.X.EXTDEP_RUNNING_TOO_LONG
    Codes : 
    ---------------------------------------------------------------------------------------------
    :SET &OBJNAME = SYS_ACT_PARENT_NAME(ACT)
    :SET &RUNNO = SYS_ACT_PARENT_NR(ACT)
    :PRINT 'External Dependency inside jobplan &OBJNAME, (Run # &RUNNO) has been executing longer than expected; Please investigate.'
    ---------------------------------------------------------------------------------------------
    External Dependency ( properties )
    Actually we want to print following for better clarity - 
    - The main job plan Name ( with Run ID )
    - The task name - which is waiting to get satisfied inside the job plan.

    The problem is both of 2 function SYS_ACT_PARENT_NAME(ACT) & SYS_ACT_PARENT_NR(ACT)  returns the main job plan name NOT THE TASK NAME from which property it was called.

    Anyone has any idea - instead of printing only job plan name, how to set up a process to print "Main Job Plan Name ( with RUNID )" & "The external Task Name" which one is actually waiting to get satisfied ?


  • 2.  RE: Trying to get "External Task Name" & "Main job plan name" if certain "External task" crossed "Time Out" duration.

    Posted Jul 25, 2019 03:10 AM
    Any thoughts on this ?

    ------------------------------
    Sr. Automation Engineer
    CHICAGO MERCANTILE EXCHANGE
    ------------------------------



  • 3.  RE: Trying to get "External Task Name" & "Main job plan name" if certain "External task" crossed "Time Out" duration.

    Posted Jul 25, 2019 03:07 PM
    Hi

    not many possibilities and less thoughts :-)

    The only way I could imagine would be performing a prep_process_report on the logging-report (LOG) of the workflow.

    Unfortunately its not logged to the Report directly, if the notification objest starts, when the time frome ext. dependency exceeds....

    the only line in report I got back was e.g.
    20190725/184117.000 - U00011590 The validity period for the external dependency 'JOBS.WIN.WAIT_300' has been reduced from '000:10:00' to '000:00:34' due to the last workflow execution.

    With this you could try to get the name of the ext. dependency.

    But honestly I have no clue if this would work correctly in every case...

    cheers, Wolfgang


    ------------------------------
    I know I do really know it!
    ------------------------------



  • 4.  RE: Trying to get "External Task Name" & "Main job plan name" if certain "External task" crossed "Time Out" duration.
    Best Answer

    Posted Jul 26, 2019 06:21 AM
    Hi,

    You can make use of built in variable &UC_CAUSE_NAME by adding :READ &UC_CAUSE_NAME,, in the SYSTEM.SCRIPT.X.UC4.EXTDEP_RUNN.. object. The value of this variable is actually the name of the external dependency object. Hope this solves your problem.

    Kind regards

    Intizar


  • 5.  RE: Trying to get "External Task Name" & "Main job plan name" if certain "External task" crossed "Time Out" duration.

    Posted Jul 26, 2019 09:50 AM
    great, that works perfectly :-)

    THX for the info!

    ------------------------------
    I know I do really know it!
    ------------------------------



  • 6.  RE: Trying to get "External Task Name" & "Main job plan name" if certain "External task" crossed "Time Out" duration.

    Posted Jul 26, 2019 10:02 AM

    Excellent !!!! .. just one line to solve my problem :). It was really helpful Thanks a lot. .... 

    https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/12.2/AWA%20Guides/help.htm#AWA/Variables/Variables_Ref_ReadBuffer.htm?Highlight=UC_CAUSE_NAME



    ------------------------------
    Sr. Automation Engineer
    CHICAGO MERCANTILE EXCHANGE
    ------------------------------



  • 7.  RE: Trying to get "External Task Name" & "Main job plan name" if certain "External task" crossed "Time Out" duration.

    Posted Jul 29, 2019 02:38 AM
    You're welcome, glad I was able to help