Automic Workload Automation

 View Only
  • 1.  Child Objects of Event Object

    Posted Nov 18, 2019 05:01 AM
    Hi All,

    I am trying to fetch the child objects loaded from an event object. But there seems to be no report loading in any of the event report file.
    Is there any way to fetch the child objects at different level loaded from an event?

    Event--->IEvent--->Workflow--->Jobs

    I have the input as parent Event Run id alone.I am trying to achieve this in AE scripting.
    Kindly help me out on this....

    Thanks in advance...

    ------------------------------
    Ganesh~J
    ------------------------------


  • 2.  RE: Child Objects of Event Object

    Posted Nov 19, 2019 04:22 AM
    Hi

    this is not directly possible - as EVNT Script is processed at Start from event object and !Script always the Event definition triggers.

    So during Script execution from the event object you won't get a future report when/which triggers will take place.

    So if possible, try the other way round from children to parents to grandparents, thats easy cheesy (mostly...)

    If not then you will need a recursive SQL.

    Another possibility would be using a Run-VARA all executions + EVNT write into it.

    cheers, Wolfgang

    ------------------------------
    Support Info:
    if you are using one of the latest version of UC4 / AWA / One Automation please get in contact with Support to open a ticket.
    Otherwise update/upgrade your system and check if the problem still exists.
    ------------------------------



  • 3.  RE: Child Objects of Event Object

    Posted Nov 19, 2019 09:33 AM
    Thanks Wolfgang for your reply.

    As you have mentioned to link in the reverse way like child to parent mapping.Can you just explain some more in detail regarding this one like the keyword to be used to get the child and their parent to be marked/linked.



  • 4.  RE: Child Objects of Event Object
    Best Answer

    Posted Nov 20, 2019 02:37 AM
    Hi

    its a combination of more keywords :-) one could say its a little script.

    I put a SCRI object (containing the script) into a workflow and call it via activate_uc_object from the !EVNT script  of a EVNT.FILE object.


    SCRI:

    :PRINT "Myself: &$NAME# &$OBJECT_TYPE# &$RESTART_RUNID#"
    :PRINT "Paps(ACT): &$ACTIVATOR# &$ACTIVATOR_TYPE# &$ACTIVATOR_RUNID#"

    :SET &GRANDDAD_RUNID# = GET_STATISTIC_DETAIL(&$ACTIVATOR_RUNID#,PARENT_ACT)
    :SET &GRANDDAD_NAME# = GET_STATISTIC_DETAIL(&GRANDDAD_RUNID#,NAME)
    :SET &GRANDDAD_TYPE# = GET_STATISTIC_DETAIL(&GRANDDAD_RUNID#,OBJECT_TYPE)
    :PRINT "Grand Dad(ACT): &GRANDDAD_NAME# &GRANDDAD_TYPE# &GRANDDAD_RUNID#"

    :SET &GRANDDAD2_RUNID# = GET_STATISTIC_DETAIL(&GRANDDAD_RUNID#,PARENT_ACT)
    :SET &GRANDDAD2_NAME# = GET_STATISTIC_DETAIL(&GRANDDAD2_RUNID#,NAME)
    :SET &GRANDDAD2_TYPE# = GET_STATISTIC_DETAIL(&GRANDDAD2_RUNID#,OBJECT_TYPE)
    :PRINT "Grand2 Dad(ACT): &GRANDDAD2_NAME# &GRANDDAD2_TYPE# &GRANDDAD2_RUNID#"

    :SET &GRANDDAD3_RUNID# = GET_STATISTIC_DETAIL(&GRANDDAD2_RUNID#,PARENT_ACT)
    :SET &GRANDDAD3_NAME# = GET_STATISTIC_DETAIL(&GRANDDAD3_RUNID#,NAME)
    :SET &GRANDDAD3_TYPE# = GET_STATISTIC_DETAIL(&GRANDDAD3_RUNID#,OBJECT_TYPE)
    :PRINT "Grand3 Dad(ACT): &GRANDDAD3_NAME# &GRANDDAD3_TYPE# &GRANDDAD3_RUNID#"

    my own (=SCRI) Runid and the one of paps is easy to obtain via predefined scriptvariables.
    all others can be obtained by using GET_STATISTIC_DETAIL.

    Report of the SCRI:
    2019-11-19 10:11:40 - U00020408 Myself: SCRI.UC4.FILEVENT.FINDPARENTS SCRI 0343722564
    2019-11-19 10:11:40 - U00020408 Paps(ACT): JOBP.UC4.FILEVENT.FINDPARENTS JOBP 0343722563
    2019-11-19 10:11:40 - U00020408 Grand Dad(ACT): EVNT.UC4.FILEEVENT.FINDPARENTS !EVNT 0343722562
    2019-11-19 10:11:41 - U00020408 Grand2 Dad(ACT): EVNT.UC4.FILEEVENT.FINDPARENTS EVNT 0343712692
    2019-11-19 10:11:41 - U00020408 Grand3 Dad(ACT): WBRUE/UC4 USER 0343596825

    I've put the object type to the output to differ between EVNT and !EVNT and in general I think its easier with the jobtype :-)

    cheers, Wolfgang

    ------------------------------
    Support Info:
    if you are using one of the latest version of UC4 / AWA / One Automation please get in contact with Support to open a ticket.
    Otherwise update/upgrade your system and check if the problem still exists.
    ------------------------------