Automic Workload Automation

 View Only
  • 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.



    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..."
    :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"
    :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).



    See also automation_engine/ 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.