Agent Groups

An Agent Group is a distinct entity that contains one or more agents within a logical group. This group has properties which are used to dictate how the agents interact with one another in the context of an automation object embedded within a workflow. Groups are identified by a unique name (though the name itself is not used internally as its identifier, but rather a unique ID). Groups can be used in place of agents within workflows.

Properties

Each Agent Group has properties that are specific to that particular instance of the group. They are as follows:

Behavior

An Agent Group’s behavior in a running workflow is determined primarily by the type of object the Agent Group is applied to. Characteristics such as object deployment to an agent, as well as error handling and processing vary depending on the automation object being executed.

Tasks

When an Agent Group is assigned to a task object, the task is executed on all agents in that group simultaneously. Workflow execution suspends at the task object until task execution on all agents are completed. The task must complete successfully on all agents within the group in order for the Success arrow extending from the task to proceed. If the task fails on one or more agents in the group, the Failure arrow (if present) proceeds. A task object’s result is determined by the outcome of the task that runs on the default (first) agent in the Agent Group.

For example, assume Agent Group A consists of Agent 1, Agent 2 and Agent 3 (in that order). Consider the following workflow:

 

In this situation, the Failure Chooser task will execute simultaneously on Agent 1, Agent 2 and Agent 3. The workflow waits until the task completes on all three agents. The chart below details how the workflow proceeds in several cases:

Result

Workflow Progression

All tasks completed successfully on all agents

The Success arrow is followed, and the Display Success task executes on agent sbr.

All tasks failed on all agents

The Failure arrow is followed, and the Display Failure task executes on agent sbr.

The task completes successfully on Agent 1 and Agent 2, but fails on Agent 3

The Failure arrow is followed, and the Display Failure task executes on agent sbr.

 

Additionally, If the Failure Chooser task is set to also return a result based on a task variable (i.e. AMTaskResult), the corresponding Result arrow matching the AMTaskResult as set by Agent 1 is followed regardless of whether or not the task completes successfully on all agents. This is because only Agent 1’s result (being the default agent in the group) is considered when evaluating Result arrows in a workflow.

For example, if Agent 1 populates AMTaskResult with 20 but the task fails on all agents, both the Failure and Result (with the value of 20) arrows would follow. Conversely, if Agent 2 sets AMTaskResult to 20 but Agent 1 does not, and the task fails on all agents, only the Failure arrow would follow.  

Triggering Condition

When an Agent Group is assigned to a condition object acting as a triggering condition, the condition is set as a trigger on all agents in the agent group. The workflow starts when the triggering condition is fired on any of the agents in the group. The workflow AMTrigger dataset is populated relative to the agent that the triggering condition occurred on. This allows one trigger condition to be assigned to multiple agents in one workflow.

For example, assume Agent Group A consists of Agent 1, Agent 2 and Agent 3 (in that order). Consider the following workflow:

Once a user presses Shift+Alt+9 on Agent 1, Agent 2 or Agent 3, the workflow will follow the Success arrow and run the Display Success task on agent sbr. Note that the Failure and Result (with value of 20) arrows would never be followed in this workflow since triggering conditions do not currently return failure or result values.

Agent Grouping tied to triggering conditions is especially powerful when coupled with Workflow Runtime Properties.

 

Conditions

When an Agent Group is assigned to a condition object that is not a triggering condition, the condition is successful if the condition evaluates to True for one or more agents, and fails if the condition evaluates to False for all agents. The first agent that evaluates the condition to true is used to populate the AMCondition workflow dataset, and all other true conditions are ignored. This allows the workflow to wait for and/or examine for a condition to be true on any one machine in the agent group.

For example, assume Agent Group A consists of Agent 1, Agent 2 and Agent 3 (in that order). Consider the following workflow:

In this situation, the Delicious task will execute on agent sbr. Once the task completes, the Wait 10s For Notepad Process condition begins. Because an Agent Group was assigned to the condition, the workflow will wait up to ten seconds on each agent for the Notepad.exe process to start. The chart below details how the workflow proceeds in several cases:

Result

Workflow Progression

Notepad starts within ten seconds on Agent 2.  Notepad does not start on Agent 1 or Agent 3.

The Success arrow is followed, and Display Success task executes on agent sbr. The AMCondition variable is set with the result data from Agent 2.

Notepad starts within ten seconds on Agent 3, then Agent 2 and Agent 1

The Success arrow is followed once the result from Agent 3 arrives, and Display Success task executes on agent sbr. The AMCondition variable is set with the result data from Agent 3. The remaining results are discarded.

Notepad does not start within 10 seconds on any agent in the group

The Failure arrow is followed, and Display Failure task executes on agent sbr.

 

Note: The 20 Result arrow would never be followed in this workflow since conditions do not currently return result values.

See Also

Agents

Creating and Managing Agent Groups

Deploying and Managing Agents

System Agents