Resources in TA

Jobs often require external resources to run to completion. The term, resources, can be used to refer to any physical or virtual asset that is used during the processing of a job. This resource may be a piece of hardware such as a printer or it may be software like a database. Agents and queues are also considered resources that are used during the processing of a job. By officially designating an asset as a resource, the use of that resource can be quantified to limit how many jobs can use it at once.

It is important to remember that a resource can still be used in TA even if it is not designated as a resource. Designating something as a resource is just a more effective way to manage access to it. While multiple jobs can use the same resource at the same time, a numerical limit is imposed on the resource during its definition to restrict access by quantifying how much of the resource is available to each individual job.

While a job can still use an asset even if it is not specifically assigned to it, access management of that asset is bypassed. The purpose of designating an asset as a resource is to prevent the resource from being overwhelmed by simultaneous demand from multiple jobs and to impose order on the use of the resource. Once an asset is defined as a resource the operator should ensure that the resource is assigned to all jobs that need that resource to ensure that proper management of the resource is enforced. Jobs that use the resource without the constraints imposed by resource management negate the benefits gained from this feature and receive the lowest priority for access.

If a resource is assigned to a job then that job cannot run without the resource. The resource is managed by imposing a limit to the number of jobs that can simultaneously use it, ensuring a more efficient allocation of the resource. A job with an assigned resource is guaranteed the use of that resource until the job completes. When the job runs, it locks up its share of the resource so that no other job can use that portion of the resource until the job is done. When the job completes, its share of the resource is released for other jobs to use. While a job can have multiple resources assigned to it, the job cannot run until all of the resources assigned to it are available. None of the resources are locked up by the job until all of the resources are available and the job can run. This “all or nothing” approach prevents resources from being tied up needlessly if they cannot be used.

Note: If you assign a job class to a job group, all child jobs within that job group without an assigned job class are automatically assigned the group’s job class.

System inefficiencies are created when too many jobs try to use a resource at the same time. Assigning a specific amount of a defined quantity of a resource to each job ensures that the resource is not deluged with more work than it can handle. Queues and dependencies can be used to control how many jobs access a resource at the same time but they are insufficient in certain instances.

Queues offer a way to manage access to a resource if the job does not require more than one resource to run to completion. However, queues are ineffective at managing a job's access to a resource if the job requires more than one resource as it processes. On the other hand, if variable dependencies are constructed to control the use of a resource by a job, if the job rolls over to the next production day, then a situation arises where two copies of the job will be updating the variable.

When defining a resource, a limit or numeric quantity is specified. If the limit is one, then the resource is single-threaded and only one job at a time can use it. If the limit is six then up to six jobs can use the resource at once. However, a job may require multiple quantities of the resource at a time. For example, one job may require three licensed connections to a database resource while another job needs two parts of the possible accesses to the resource. Even if a single use is available it is possible that it may go unused even if jobs are waiting to use the resource because the other jobs may require more than one access to the resource.

Resources Interface

Accessing the Resources Interface

Click Definitions > Resources on the Navigation pane and then select either Virtual Resources or System Resources to display the Resources pane.

You can double-click a resource listed in the Resources pane to display its definition dialog to view information about it.

Buttons

  • Add Resource – Displays the Resource Definition dialog to can add a new resource.

  • Edit Resource – Displays the Resource Definition dialog to edit an existing resource.

  • Copy Resource – Creates a copy of the selected resource with the same information as the selected resource, except for the name.

  • Delete Resource – Removes the selected resource definition from the TA database.

  • Refresh – Updates the data in the current pane.

  • Print – Displays the Report window to view and print the defined resources that are listed.

Search Field

Enter text that you want to search for within the columns displayed into this field.

Note: This field at the top right of the grids will only search text columns that are not grayed out and are string-based.

Columns

  • Name – The name of the resource.

  • Owner – The name of the owner of the resource. The user who defines the resource is the default user but ownership can be transferred by modifying the Owner field in the Resource Definition dialog.

  • Limit – Indicates the quantity of a defined resource. Usually the limit is one but it can be any quantity. For example, a resource that is a database may be licensed for up to three simultaneous connections. Then that resource would have a limit of three.

  • In Use – If the resource is exclusively used by a single job, then this column displays the value Exclusive. Otherwise, the column indicates how much of the resource's limit is currently being used.

  • Enabled – Whether or not the resource is enabled (or active) and available for use.

  • Public – Whether or not the resource is available to other users.

  • Description – The description of the resource.

Resources Preferences Dialog

If you select Preferences from the View main menu while viewing the Resources pane, the Resources Preferences dialog displays.

From the Resources Preferences dialog, you can select which columns are displayed in the Resources pane and in what order they appear.

A checkmark to the left of a column title indicates that it will be displayed in the pane. No checkmark indicates that it will not be displayed.

To rearrange the order in which the columns are displayed, select the column and click the up or down arrow.

Navigation Context Menu

Right-clicking in the Navigation pane while viewing the Resources pane, displays a context menu.

The Navigation context menu contains these elements:

  • Add Virtual Resource – Displays the Virtual Resource Definition dialog to add a new resource. This option has the same function as the Add Resource button.

  • Add System Resource – Displays the System Resource Definition dialog to add a new queue. This option has the same function as the Add Resource button.

  • Preferences – Displays the Preferences dialog for the Resources pane.

  • Print – Displays the Reports pane to view and print your resource definitions. This option has the same function as the Print button on the toolbar.

  • Export – Saves the data in the current pane as an ASCII text file. You can then use the file data in other applications.

  • Refresh – Updates the data in the current pane.

Resources Pane Context Menu

Right-clicking in the Resources pane, displays the Resources pane context menu.

This context menu contains these options:

  • Add Virtual Resource – Displays the Resource Definition dialog to add a new resource. Once defined, a resource is assigned to a job from the Resources tab of a job definition.

  • Add System Resource – Displays the Resource Definition dialog to add a new resource. Once defined, a resource is assigned to a job from the Resources tab of a job definition.

  • Edit Virtual Resource – Displays the Virtual Resource Definition dialog to edit the selected resource.

  • Edit System Resource – Displays the System Resource Definition dialog to edit the selected resource.

  • Delete Virtual Resource – Deletes the selected virtual resource.

  • Delete System Resource – Deletes the selected virtual resource.

  • Print – Prints the selected resource’s data.

Virtual Resource Definition Dialog

Accessing the Virtual Resource Definition Dialog

The Virtual Resource Definition dialog displays when adding or editing a virtual resource in the Resources pane.

Common to All Tabs

  • Virtual Resource Name – The name of the virtual resource.

  • Owner – The owner of the virtual resource. This can be an individual user or a TA workgroup. By default the owner is the user that defined the resource. From this field, the ownership can be transferred to another owner.

  • Limit – Indicates the quantity of a defined resource. By default, the limit is one but it can be any quantity. For example, a resource that is a database may be licensed for three simultaneous connections. Then that resource would have a limit of three.

  • In Use – If the resource is exclusively used by a single job, then this field displays the value Exclusive. Otherwise, this field indicates how much of the resource's limit is currently being used. This is a read-only field.

  • Available – Indicates what quantity of the resource is still available to be used. This is a read-only field.

  • Requested – The quantity that of the resource requested to be made offline.

  • Actual – The actual quantity of the resource made offline.

  • All Virtual Resources – If selected, all virtual resources are requested to be made offline. When you select this checkbox, the Requested field is disabled.

Description Tab (Virtual Resource Definition)

The Description page of the Virtual Resource Definition dialogs is used to describe the resource and its purpose and how it might be used. A user can check the Jobs page to view a list of the jobs that have this resource assigned to them. If the Enabled option is not selected then the resource is not available in lists.

Note: A defined job will still run even if the resource assigned to it is disabled. The Master will ignore a job's need for the disabled resource and release the job to run when its dependencies are met and its other required resources are available. If you want to prevent any jobs using a particular resource from running, change the limit in the resource's definition to 0. The job will remain in a Waiting on Resource status and never be released.

Jobs Tab (Virtual Resource Definition)

The Jobs tab is a read-only tab providing information on the jobs or the job groups that access this resource.

This tab contains these elements:

  • Job Name – The name of the job or the job group using this resource.

  • Amount – The quantity of the resource allotted to the job or the job group. This is assigned from the Resources tab of the job’s definition or the job group’s definition.

  • Exclusive Use – Displays Yes if the Exclusive Use option in the Resource Requirement Definition dialog is selected. Displays No if the Exclusive Use option in the Resource Requirement Definition dialog is not selected.

Locked Virtual Resources Tab (Virtual Resource Definition)

This tab lists the job instance or the job group instance that is currently locking up the virtual resource. When a job or a job group has all of its required resources and is ready to run, the job or the job group locks up the assigned resources for its exclusive use until the indicated job completes.

Once a job starts running the resources assigned to it cannot be modified or deleted until the job completes. Once the job completes, the assigned resources are released to be used by other jobs. Any job listed with a value Exclusive has an exclusive lock such that no other job can simultaneously use any resource quantity/Any job listed with a value Exclusive Pending indicates that the job is waiting in the queue to attain an exclusive lock on the resource once other jobs relinquish their assigned quantities.

System Resource Definition Dialog

Accessing the System Resource Definition Dialog

The System Resource Definition dialog displays when adding or editing a system resource in the Resources pane.

Agents that support published system resources provide information about those resources when a connection is established. System resource definitions are automatically created for published resources if they do not already exist for that connection type. The command displays “Published”.

You can view a read-only dialog when you double-click a published resource from within the System Resource pane.

You can create new system resource definitions by specifying commands that will periodically run on the agent machine to obtain the resource values.

Common to All Tabs

  • Resource Name – The name of the system resource.

  • Apply to all connection – Click this option if you want to apply the system resource to all connections.

  • Variables – When you are in the Value field, click this button to enter a system, job or job event variable. You can use this function to set the value of the variable to the value of another variable. You can also set the variable to a string based on the values of other variables. The values of the variables are substituted at the time that the action is executed.

System Resource Definition – Command Tab

In the Command tab, provide the command to be executed, whether to use the command output or the exit code of the command as the resource value, the data type of the resource value, and the refresh rate.

This page contains these elements:

  • Command – Contains the command to be executed.

  • Parameters – Contains the command parameters for the resource

  • Use – Select one of these to use as the resource value:

    • Command Output – Select to use the command output of the command as the resource value

    • Exit Code – Select to use the exit code of the command as the resource value.

  • Type – Select the resource type from this list. Supported types are Integer and String. If Exit Code is selected as the resource value, the Type is set to Integer only.

  • Refresh every minutes – set the refresh rate for published system resources in minutes.

System Resource Definition – Agents Tab

The Agents tab allows for the selection of an agent(s) to collect the resource for.

  • If “Apply to all <type> connections” is selected, then the resource is collected for all agents of this type.

  • If “Apply to all <type> connections” is not selected, then the agents to collect this resource for must be selected in this tab.

Agents that support published system resources will provide information about those resources when the connection is established.

System Resource Definition – Agent Lists Tab

The Agents Lists tab allows for the selection of an agent list(s) to collect the resource from.

  • If “Apply to all <type> connections” is selected, then the resource is collected from all agent lists of this type.

  • If “Apply to all <type> connections” is not selected, then the agent list(s) to collect this resource from must be selected in this tab.

Agents that support published system resources will provide information about those resources when the connection is established.

System Resource Definition – Description Tab

This tab is used to describe the resource and its purpose. This field can be used for notes about how the resource should be used and any special requirements or prerequisites.

Related Agents Dialog

The Related Agents dialog is accessed via the context menu on System Resource pane and contains a list of agents related to the selected system resource.

This dialog contains these elements:

  • Agent Name – The name of the agent related to the selected resource

  • Current Value – The current value of the selected resource for each agent

  • Refresh Rate – The refresh rate for the resource. When the connection to the agent is made, the Master will tell the agent what the refresh rate should be for published system resources. The refresh rate will be kept globally for all agents, but this can also be overridden for individual agents.

  • Last Refresh – The date of the last refresh for the resource

Resource Requirement Definition Dialog

The Resource Requirement Definition dialog is used to add or edit an existing virtual resource to a job or a job group from the Resources tab of a job definition or a job group definition. From this dialog, you specify which resource and how much of the resource is needed by a job or a job group. If the Enabled option is not selected in the resource's definition, then the resource does not display in the drop-down list.

This dialog contains these elements:

  • Resource – The name of the defined resource. Only resources that are enabled are available from this field. Once the resource is selected, its limit displays beside the Amount Required field.

  • Amount Required – The amount of the resource's specified limit that the job or the job group requires. This number cannot exceed the limit of the resource noted as (Max) beside the field.

  • Exclusive Use – Enable this checkbox if you want the job or job group to lock the resource for exclusive use.

    When you select this option, the

    • Job or job group runs only when no other job is using the resource.

    • Amount Required field is disabled.

System Resource Requirement Definition Dialog

The System Resource Requirement Definition dialog is used to add or edit an existing virtual resource to a job or a job group from the Resources tab of a job definition or a job group definition. From this dialog, you specify which resource and how much of the resource is needed by a job or a job group. If the Enabled option is not selected in the resource's definition, then the resource does not display in the drop-down list.

This dialog contains these elements:

  • System Resource – The name of the defined resource. Only resources that are enabled are available from this field.

  • Operator – Select the conditional operator depending on the data type of the resource.

  • Value – Enter the value for the selected resource.

Resources Procedures

Defining a Resource

Just about anything can be defined as a resource. The resource can be a physical item like a disk partition or a virtual item like a database. Normally you would not define something as a resource unless you want to manage the amount of access to that resource.

To define a resource:

  1. Click Definitions > Resources on the Navigation pane to display the Resources pane.

  1. Click Add Resource or right-click in the Resources pane and select the Add Resource option to display the Resource Definition dialog.

  2. Click the Resource Name field and enter a name for the resource that helps you identify the resource.

  1. Choose a user to own the resource in the Owner field.

  1. Specify a maximum number of shares on the resource in the Limit field. The value entered here will limit access to this resource to no more than the designated amount. The default is one but any number up to 32,767 can be entered here.

The In Use field will display the quantity of designated shares of the resource is being currently used while the Available field displays how much of the resource is still available to be used.

Determining Which Jobs are Using a Resource

You can determine which jobs are using a resource by examining the Jobs tab in the Resource Definition dialog. This is handy when you need to determine where a resource’s shares are being used, especially if you have a job that is waiting on access to that resource before it can run.

To determine which jobs are using a resource:

  1. Click Definitions > Resources on the Navigation pane to display the Resources pane.

  1. Double-click the desired resource to display its definition.

  1. Сlick the Jobs tab to display a list of the jobs that are assigned the resource.

The number of resource shares assigned to the job is listed in the Amount column. Only the jobs that are currently running will display a value in the Locked column. This value is the job instance ID number.

Restricting Use of a Resource

To restrict the use of a resource to only designated users, clear the Public option at the bottom of the Resource Definition dialog. You can than assign ownership of the resource to a specific user account or assign it to a workgroup so that only members of that workgroup can access the resource.

Overriding a Locked Up Resource

If a resource is running at its designated limit, no other jobs can run until one of the currently running jobs completes, freeing up its share of the resource. If you are unable to wait until shares of the resource open up, you can always increase the number of shares of the resource.