Here is an SEC SQLI VARA that will look up the mode of an agent group.
select OHG_Modefrom OH left join OHGon OH_Idnr = OHG_OH_Idnrwhere OH_Name = ?
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#)."
U00020408 AE_NODES_BOTH is an agent group. Checking AG mode... U00020408 AE_NODES_BOTH mode is 'all' (X).
See also automation_engine/Lookup_agentgroup_mode.md at master · michael-lowry/automation_engine · GitHub
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.
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.