Automic Workload Automation

Expand all | Collapse all

Difference between &$PROCESSOR_RUNID# and &$ACTIVATOR_RUNID#?

Michael A. Lowry

Michael A. LowryJan 30, 2018 04:36 PM

  • 1.  Difference between &$PROCESSOR_RUNID# and &$ACTIVATOR_RUNID#?

    Posted Jan 30, 2018 01:14 PM
    What is the difference between &$PROCESSOR_RUNID# and &$ACTIVATOR_RUNID#? Specifically, when at they likely to differ?




  • 2.  Difference between &$PROCESSOR_RUNID# and &$ACTIVATOR_RUNID#?

    Posted Jan 30, 2018 01:52 PM
    Is my assumption correct that you want to know the difference between activator and processor in general?

    => here is an explanation:
    https://docs.automic.com/documentation/WEBHELP/English/AWA/11.2/AE/11.2/All%20Guides/help.htm#ucabra.htm

    cheers, Wolfgang


  • 3.  Difference between &$PROCESSOR_RUNID# and &$ACTIVATOR_RUNID#?

    Posted Jan 30, 2018 04:36 PM
    m6hqq99c4pl7.jpeg
     :'( 


  • 4.  Difference between &$PROCESSOR_RUNID# and &$ACTIVATOR_RUNID#?
    Best Answer

    Posted Jan 31, 2018 03:01 AM
    Here is the V12.1 Version:

    https://docs.automic.com/documentation/webhelp/english/AWA/12.1/DOCU/12.1/AWA%20Guides/help.htm#AWA/Executions/Exec_SuperordinateTask.htm?Highlight=Superordinate%20Tasks

    And here as special giveaway the V11.2 docu regarding Superordinate Tasks as screenshot :-)

    cl0s3s4ozg1b.jpg




  • 5.  Difference between &$PROCESSOR_RUNID# and &$ACTIVATOR_RUNID#?

    Posted Jan 31, 2018 03:57 AM
    The screenshot I posted above was from my iPhone. The documentation website is unusable on small devices. I’m not expecting this to change of course; I notified Automic about this problem a year ago, and if it were going to be fixed, it probably would have been fixed by now. I’m just expressing my frustration. :)


  • 6.  Difference between &$PROCESSOR_RUNID# and &$ACTIVATOR_RUNID#?

    Posted Jan 31, 2018 04:32 AM
    Ahhh I didn't realize this. Never tried that on my iphone... I always prefer a "real" PC or Notebook....

    :-)


  • 7.  Difference between &$PROCESSOR_RUNID# and &$ACTIVATOR_RUNID#?

    Posted Jan 31, 2018 05:11 AM

    The documentation does not make the difference between processor and activator entirely clear, but I think I understand it now.

    Processor: The parent task, for tasks that run inside a workflow, schedule, or job group
    Activator: The effective parent for tasks started any other way, including:

    • tasks started manually by a user (via the JUI or AWI)
    • tasks started via the CallAPI
    • tasks started via the Java Application Interface (the ExecuteObjectclass)
    • tasks started via ACTIVATE_UC_OBJECT
    • tasks started via object settings likeelse-execute(e.g., notification objects)
    • tasks started from task properties (e.g, post-conditions)


  • 8.  Difference between &$PROCESSOR_RUNID# and &$ACTIVATOR_RUNID#?

    Posted Jan 31, 2018 05:35 AM
    yeah that sounds logical.

    What I do completely miss would be a list in which case (script command or statistic record) which one would be returned....

    As one eternal workaround I check for ACT, if its empty I use PRC
    ..if its necessary...
    in most cases ACT will be returned from the AE.

     

    : PRINT "ACT: &$ACTIVATOR_RUNID#"
    : PRINT "PRC: &$PROCESSOR_RUNID#"
    : IF &$ACTIVATOR_RUNID# = "" OR " "
    :  SET &PARENT_RUNID# = &$PROCESSOR_RUNID#
    : ELSE
    :  SET &PARENT_RUNID# = &$ACTIVATOR_RUNID#
    : ENDIF
    : PRINT "&&PARENT_RUNID# = &PARENT_RUNID#"

     


    cheers, Wolfgang




  • 9.  Difference between &$PROCESSOR_RUNID# and &$ACTIVATOR_RUNID#?

    Posted Jan 31, 2018 05:40 AM
    Yeah, I wrote my own JOBI for this moments ago. :)

    UC4.PRINT_TASK_DETAILS.JOBI

    Print the details of the currently-running task
    :SET &LNR# = SYS_ACT_ME_LNR()
    :IF &LNR# <> ""
    :  SET &LNR# = FORMAT(&LNR#,"000")
    :ELSE
    :  SET &LNR# = "  "
    :ENDIF
    :IF &$ALIAS# <> &$NAME#
    :  SET &ALIAS# = "(&$ALIAS#)"
    :  SET &Header# = "              Run ID      Type  Lnr  Name (Alias)"
    :ELSE
    :  SET &Header# = "              Run ID      Type  Lnr  Name"
    :ENDIF
    :PRINT "&Header#"
    :IF &$IN_PROCESSFLOW# = "Y"
    :  IF &$TOP_PROCESSFLOW_RUNID# <> &$PROCESSOR_RUNID#
    :    SET &TOP_PROCESSFLOW_RUNID# = FORMAT(&$TOP_PROCESSFLOW_RUNID#,"0000000000")
    :      PRINT "Top WF     :  &TOP_PROCESSFLOW_RUNID#  &$PROCESSOR_TYPE#       &$TOP_PROCESSFLOW_NAME#"
    :  ENDIF
    :ENDIF
    :IF &$PROCESSOR_RUNID# <> ""
    :  SET &PROCESSOR_RUNID# = FORMAT(&$PROCESSOR_RUNID#,"0000000000")
    :  PRINT "Processor  :  &PROCESSOR_RUNID#  &$PROCESSOR_TYPE#       &$PROCESSOR#"
    :ENDIF
    :IF &$ACTIVATOR_RUNID# <> ""
    :  IF &$ACTIVATOR_RUNID# <> &$PROCESSOR_RUNID#
    :    SET &ACTIVATOR_RUNID# = FORMAT(&$ACTIVATOR_RUNID#,"0000000000")
    :    PRINT "Activator  :  &ACTIVATOR_RUNID#  &$ACTIVATOR_TYPE#       &$ACTIVATOR#"
    :  ENDIF
    :ENDIF
    :SET &RUNID# = FORMAT(&$RUNID#,"0000000000")
    :PRINT "This task  :  &RUNID#  &$OBJECT_TYPE#  &LNR#  &$NAME# &ALIAS#"
    :IF &$PARTNER_TYPE# <> ""
    :  PRINT "  Partner type : &$PARTNER_TYPE#"
    :ENDIF
    :IF &$IN_PROCESSFLOW# = "Y"
    ! Version 12.0 and later only
    ! :  IF &$COMPONENT_NAME# <> ""
    ! :    PRINT "Component name : &$COMPONENT_NAME#"
    ! :  ENDIF
    :ENDIF
    :SET &ACTIVE# = SYS_STATE_ACTIVE()
    :PRINT "Task Active: &ACTIVE#"
    Sample output from a task inside a workflow that is also inside a workflow:
                  Run ID      Type  Lnr  Name (Alias)
    Top WF     :  0132805241  JOBP       UC0.MAL.TASK_DETAILS_TEST_PARENT.JOBP
    Processor  :  0132809191  JOBP       UC0.MAL.TASK_DETAILS_TEST.JOBP
    This task  :  0132809192  SCRI  002  UC0.MAL.TASK_DETAILS_TEST.SCRI (CHILD_TASK)
    Task Active: N
    I do not know of a straightforward way to determine the alias or Lnr of the parent workflow within its parent.


  • 10.  Difference between &$PROCESSOR_RUNID# and &$ACTIVATOR_RUNID#?

    Posted Jan 31, 2018 06:24 AM
    Michael Lowry said:
    I do not know of a straightforward way to determine the alias or Lnr of the parent workflow within its parent.
    I am afraid there is no direct command or possibility to get the LNR of the Parent's Parent...
    At lease none that I would be aware of... Script function and predefined Variables do not fulfill that...

    => INC with a prep_process_var on an SQLI VARA should do the trick....


  • 11.  Difference between &$PROCESSOR_RUNID# and &$ACTIVATOR_RUNID#?

    Posted Jan 31, 2018 06:27 AM
    ...same with Alias...

    => INC with a prep_process_var on an SQLI VARA should do the trick....


  • 12.  Difference between &$PROCESSOR_RUNID# and &$ACTIVATOR_RUNID#?

    Posted Jan 31, 2018 07:51 AM

    Wolfgang Brueckler wrote:

    => INC with a prep_process_var on an SQLI VARA should do the trick....

    Or an EXEC VARA & SQL job. ;)

    I’m a bit confused about the meaning of this text in the documentation of superordinate tasks https://docs.automic.com/documentation/webhelp/english/AWA/12.1/DOCU/12.1/AWA%20Guides/help.htm#AWA/Executions/Exec_SuperordinateTask.htm:

    Activator (ACT): This type directly activates tasks but it is not responsible for monitoring their execution:
    ...
    Tasks that execute the SYS_STATE_ACTIVE script element
    ...

    This suggests that merely running SYS_STATE_ACTIVE()  in a task will impact whether the activation type is PRC or ACT. My tests did not confirm this. Running SYS_STATE_ACTIVE() in a task has no effect on whether the activation type of the task is PRC or ACT

    Incidentally, running SYS_STATE_ACTIVE() on the task itself (i.e., with no arguments) always returns N. I believe this is because the evaluation of AE script statements happens during activation/generation, so when the command is run, the task is not yet active. Running the command in this way does not seem particularly useful.



  • 13.  Difference between &$PROCESSOR_RUNID# and &$ACTIVATOR_RUNID#?

    Posted Jan 31, 2018 08:13 AM
    What is &$COMPONENT_NAME# by the way? I see that it was added in v12.0, but every time I have tested the variable, it has been empty. Is it related to RA jobs?


  • 14.  Difference between &$PROCESSOR_RUNID# and &$ACTIVATOR_RUNID#?

    Posted Feb 05, 2018 08:39 AM
    Automic_Community_5543: Any luck finding answers to the questions on SYS_STATE_ACTIVE() and &$COMPONENT_NAME#?