Increase Workflow Performance with Agent Group Distribution

by Marjo Martinez, in Tech Talk, posted 4/11/11

Introduction

AutoMate BPA Server's multi-machine functionality allows a single workflow the ability to monitor for conditions and execute tasks on multiple machines situated in different physical locations. This is made possible primarily due to "Agents" that are deployed onto remote machines and their facility to interact directly with the Execution Server via TCP/IP. Once connection is established, the Execution Server can conveniently notify the proper Agent of which system events or conditions to monitor and which tasks to execute upon the occurrence of such events/conditions. This concept can be further enhanced with implementation of an Agent Group, which is simply a collection of Agents placed together to form a distinct unit. As a result, multiple Agents that normally interact with one another or share common goals or objectives can be easily assigned to an Agent Group allowing for improved organization and distribution of workflow objects within a multi-machine environment.

The recent introduction of AutoMate BPA Server 8 presented several new elements aimed to enhance performance and behavioral capabilities of individual Agents contained within a group. One such element is called Agent Group Distribution whichgovernshow individual Agents within a group interact with one another during workflow execution. Agent Group Distribution dictates the order in which Agents contained in a group handles their associated workflow items. For example, to eliminate errors and reduce the time spent on repetitive identical processes normally performed on a group of machines, one can create a task to simulate such a process and set it to run simultaneously on all Agents within the group. To ensure that a specific task completes successfully on at least one Agent in a group, it can be set to run on each Agent in order until a successful result occurs.

Accessing Agent Group Distribution Properties

Agent Group Distribution can be set via the Default Properties section of the Server Management Console. To access Agent Group Distribution preferences:

  1. Press the Options button located on the SMC’s (left) Navigation pane.
  2. Select the categorytitled Default Properties. Doing sopopulates the (right) main window pane with various properties grouped into sections.
  3. Scroll down to the section titled Default Workflow Item Properties and double-click Agent Group Distribution.

Available Agent Group Distribution Options

Agent Group Distribution preferences are separated into four options (as illustrated below). Each one exposes a distinct manner in which Agents in a group are allocated, thus, altering overall workflow performance.

Agent Group Distribution

Available Agent Group Distribution preferences are discussed in further detail below:

1. Run on all Agents: The specified taskwill run on all Agents contained in the group simultaneously (as illustrated below).Likewise, the specified condition will be evaluated by all Agents in the group simultaneously. Workflow execution pauses at the task or condition object until execution on all Agents are completed. By default, the task or condition must complete successfully on all Agents within the group in order for the Success Condition to be true and the workflow to proceed to the next workflow object. If the task/condition fails on one or more Agents in the group, the workflow proceeds in accordance with the Failure Condition.

All Agents

2. Run on each Agent in order until a successful result: During each workflow execution,the specified task will execute one at a time on each Agent contained in the group until a successful result occurs on a particular Agent. Similarly, the specified condition will be evaluated one at a time by each Agent until a successful result occurs. Remaining Agents (if any) will be ignored. The order of execution is determined by how each Agent is arranged in the group via the SMC’s Agent Group section. The first on the list will be the starting Agent. Workflow execution pauses at the specified task or condition object until execution is successfully completed on a given Agent. By default, the task or condition must complete successfully on at least one Agent within the group in order for the Success Condition to be true and the workflow to proceed to the next workflow object. If the task/condition fails on all Agents in the group, the workflow proceeds in accordance with the Failure Condition.

The illustration below reveals that execution on Agent 1 and Agent 2 failed but was successful on Agent 3. Since execution completed successfully on Agent 3, Agent 4 was ignored altogether.

Agent Success

3. Run on Agents in a round-robin fashion: During each workflow execution, thespecified task will run on a single Agent in the group. Likewise, during each workflow execution, the specified condition will be evaluated by a single Agent in the group. Execution is set in a round-robin fashion (as illustrated below) with the order being determined by how each Agent is arranged in the group via the SMC’s Agent Group section. The first Agent on the list will be the starting Agent. Workflow execution pauses at the task or condition object until execution is complete. Success or failure is determined by the execution outcome of the Agent.

It is important to note that this option only performs execution on a single Agent during each workflow execution. For instance, on the initial execution of the workflow illustrated below, the specified task or condition will run only on Agent 1, which is the starting Agent as specified in the SMC’s Agent Group section. All other Agents are ignored. On the second execution of the workflow, the specified task or condition will run only on Agent 2, which is the next Agent on the list. All other Agents are ignored.

The Repository always takes account of which Agent in the group performed the most recent execution (whether that execution succeeded or failed); therefore, subsequent execution will always be performed by the proper Agent. This holds true even if the BPA Server or Agent service is restarted, or if the Server or Agent machine is rebooted.

Agent RR

4. Run on Agents that meet the performance metrics: The task will run only on those Agents in the group that meet the performance criteria set for the selected Performance condition. Similarly, the condition will be evaluated by only those Agents that meet the performance criteria specified. Agents that don’t meet the criteria will be ignored. Workflow execution pauses at the task or condition object until execution on all applicable Agents are completed. By default, the task/condition must complete successfully on all applicable Agents within the group in order for the Success Condition to be true and the workflow to proceed to the next workflow object. If the task/condition fails on one or more of those Agents, the workflowproceeds in accordance with the Failure Condition.

If this option is selected, a drop-down list of all available Performance conditions becomes enabled allowing you to select the condition that should be analyzed during workflow execution. The Performance condition is ideal for monitoring servers in a back office environment, eliminating the need for human intervention. For example, the Performance condition can monitor system memory allocation thresholds. If available system memory goes below the monitored threshold, a task can automatically restart the system or determine which processes are consuming the most memory and restart those processes.

Using the previous example, the illustration below reveals that execution was performed on Agent 1 and Agent 4 because system memory allocation on these machines were either at or below the specified threshold at the time the Performance condition was evaluated. Agent 2 and Agent 3 were ignored because memory allocation was above the specified threshold on these machines at the time of evaluation. Note that any Performance condition chosen must have its Behavior properties set to Run Immediately.

Group Dist Perf

To sum up, Agent Group Distribution adds more intelligence to workflows by providing better management and control in regards to how tasks and conditions are dispersed within the context of an Agent Group. In next month’s tech article, we will discuss other important elements introduced in AutoMate BPA Server 8 which are designed to improve Agent Group functionality with regards to their multifaceted error handling capabilities.