Automic Workload Automation

  • 1.  Get agent group mode

    Posted Aug 14, 2018 12:01 PM

    Here is an SEC SQLI VARA that will look up the mode of an agent group.

     

    UC4.GET_AGENTGROUP_MODE.VARA_SEC_SQLI

    select OHG_Mode
    from OH left join OHG
    on OH_Idnr = OHG_OH_Idnr
    where OH_Name = ?

     

    Bind parameters

    1. &$AGENTGROUP#

     

    And here is an example of how to use it:

    :PRINT "&AGENT_OR_AGENTGROUP# is an agent group. Checking AG mode..."
    :SET &AGENTGROUP# = &AGENT_OR_AGENTGROUP#
    :SET &AG_Mode# = GET_VAR(UC4.GET_AGENTGROUP_MODE.VARA_SEC_SQLI)
    :SWITCH &AG_Mode#
    :CASE 'A'
    :  SET &AG_Mode_Desc# = "any"
    :CASE 'F'
    :  SET &AG_Mode_Desc# = "first"
    :CASE 'N'
    :  SET &AG_Mode_Desc# = "next"
    :CASE 'L'
    :  SET &AG_Mode_Desc# = "load dependent"
    :CASE 'X'
    :  SET &AG_Mode_Desc# = "all"
    :ENDSWITCH
    :PRINT "&AGENT_OR_AGENTGROUP# mode is '&AG_Mode_Desc#' (&AG_Mode#)."

     

    Sample output:

    U00020408 AE_NODES_BOTH is an agent group. Checking AG mode... U00020408 AE_NODES_BOTH mode is 'all' (X).

    Enjoy!

     

    See also automation_engine/Lookup_agentgroup_mode.md at master · michael-lowry/automation_engine · GitHub 



  • 2.  Re: Get agent group mode

    Broadcom Employee
    Posted Aug 14, 2018 01:23 PM

    Hi Michael, are you using that on the post process of a job? I am considering making this a searchable KB article but I want to make sure I understand how it is used first.



  • 3.  Re: Get agent group mode

    Posted Aug 14, 2018 01:27 PM

    I use it in the pre-process, in my JOBI that resolves agent groups. I wanted to find a way to warn the user that in cases where the agent mode is all, the JOBI would still resolve the agent group to just a single agent.