IConfigureSystem Interface

The Unisys.AgileBusiness.RuntimeAPI namespace contains the IConfigureSystem interface that enables you to configure AB Suite Windows runtime for performance optimization. The interface enables you to

The RuntimeFactory class includes methods to return the IConfigureSystem objects.

Refer to Definition of the IConfigureSystem Interface for more information about the interface.

Namespace: Unisys.AgileBusiness.RuntimeAPI

Assembly: Unisys.AgileBusiness.RuntimeAPI (in Unisys.AgileBusiness.RuntimeAPI.dll)

Syntax:

The IConfigureSystem object can be created by using the RuntimeFactory. GetConfigureSystem(string systemName) method.

IConfigureSystem SystemConfig = RuntimeFactory. GetConfigureSystem(systemName)

The IConfigureSystem interface exposes the following members.

Methods

Method

Description

SetComponentProperties()

Called by an application to configure the pooling settings and user role information of an AB Suite generated COM+ application.

SetDataReader()

Called by an application to configure AB Suite Windows Runtime to use the SQL Datareader feature when using the LDL+ commands such as, Determine, Lookup and ForEach.

SetMultiBehavior()

Called by an application to configure the "Multi" behavior for database reads.

SetPhasedSql()

Called by an application to configure the Phased SQL versus Non-Phased SQL for database reads.

SetTransactionIsolationLevel ()

Called by an application to configure "Transaction Isolation Level" in AB Suite Windows Runtime.

Note: The interface enables you to perform the administration tasks required for the pre-deployed applications.

Required Security Privileges

By default, only a local administrator can access the methods.

IConfigureSystem.SetComponentProperties Method

This method allows you to configure the component settings such as, Application Pooling and Recycling, Object Pooling, and Role settings for a deployed system.

Syntax

The syntax of the SetComponentProperties method is

SetComponentProperties (Unisys.AgileBusiness.RuntimeAPI. ComponentProperties properties)

Argument

Refer to Configure System Utility for more information about the various member settings and restrictions. Refer to the Agile Business Suite Installation and Configuration Guide for information about the available COM+ roles.

Return Value

If this method succeeds, it returns the StatusInfo object with the status code; Error, Warning, or Success and status message, if any.

IConfigureSystem.SetDataReader Method

This method allows you to use the MS SQL Datareader feature when accessing the LDL+ commands such as Determine, Lookup, and ForEach while reading from a database. You can configure a runtime system to use Datareader selectively. This means you can use the Datareader method for all or part of your system. For example: In defined ispecs and reports only.

The default mechanism to read records from the database by using the Server-side cursors can be replaced by using the Datareader feature. The Datareader reads a complete result set of records into a memory cache and the Determine commands returns records from the result set in the memory cache. Alternatively, the cursors read one record at a time and the next record is retrieved from the database at the beginning of an iteration of a Determine loop. If a profile or table is updated during the read process, the changes are visible in the subsequent iterations of the Determine loop.

Note: Most of the Determine commands can use the Datareader feature except where a "Sleep" command occurs within a Determine loop. The decision of using the Datareader or Cursors is automatic and internal depending on the validity of the Determine commands.

Syntax

The syntax of the SetDataReader method is

SetDataReader(Unisys.AgileBusiness.RuntimeAPI.DataReaderParameter parameter)

Argument

Return Value

If this method succeeds, it returns the StatusInfo object with the status code; Error, Warning, or Success and status message, if any. The DBConfig.xml file available at the Data\Public folder is automatically updated with the values set in the argument.

IConfigureSystem.SetMultiBehavior Method

This method allows you to define the "Multi" behavior when the Server-side cursors are used to read records from a database. Although by using cursors, a database retrieves one record at a time, you can define the "Multi" behavior that enables a database to retrieve a block of multiple records into an intermediate memory buffer. You can specify the number of records to retrieve in each block by defining the "Multi" value.

Note: The "Multi" behavior of Server-side cursors is useful when Datareader cannot be used. Although the "Multi" behavior can be specified for the whole system, all reports, or for individual ispec and report, it is recommended to define the "Multi" behavior for individual reports, where the configuration status of Datareader is "Enable".

Syntax

SetMultiBehavior(Unisys.AgileBusiness.RuntimeAPI.MultiParameter parameter)

Argument

Return Value

If this method succeeds, it returns the StatusInfo object with the status code: Error, Warning, or Success and the status message, if any. The DBConfig.xml file available at the Data\Public folder is automatically updated with the values set in the arguments.

IConfigureSystem.SetPhasedSql Method

This method allows you to define Phased or Non-Phased SQL for reading records from a database. A Phased SQL with a defined number of phases specifies the number of SQL SELECT statements submitted for retrieving records. The number of phases to retrieve all records for the Determine command is dependent on the number of keys on a profile and the type of Determine command. A Non-Phased SQL uses a single SQL SELECT statement to retrieve all the records.

Syntax

SetPhasedSql(Unisys.AgileBusiness.RuntimeAPI.PhasedSqlParameter parameter)

Argument

Return Value

If this method succeeds, it returns the StatusInfo object with the status code: Error, Warning, or Success and the status message, if any. The DBConfig.xml file available at the Data\Public folder is automatically updated with the values set in the arguments.

IConfigureSystem.SetTransactionIsolationLevel Method

This method allows you to set the "Transaction Isolation Level" in AB Suite Windows Runtime. Following are the available Transaction Isolation Level settings.

The default setting is "Read Committed".

Syntax

SetTransactionIsolationLevel(Unisys.AgileBusiness.RuntimeAPI. TransactionIsolationLevelParameter parameter)

Argument

Return Value

If this method succeeds, it returns the StatusInfo object with the status code: Error, Warning, or Success and the status message, if any. The DBConfig.xml file available at the Data\Public folder is automatically updated with the values set in the arguments.

Using the IConfigureSystem Interface

The following steps and code example illustrates the implementation of IConfigureSystem for configuring the Datareader ,Multi feature of MS SQL Server, and configuring the component settings of AB Suite generated COM+ application:

  1. Create a new C# Class Library in Microsoft Visual Studio.

  2. Add a reference to the following assembly that you need when calling from the Class Library,

    • Unisys.AgileBusiness.RuntimeAPI.dll (from <AB Suite 7.0 Installation directory>\bin64 folder)

  3. Add the following code to the Class to configure AB Suite Windows runtime:

    namespace SampleSystem
    {
        using System;
    		using Unisys.AgileBusiness.RuntimeAPI;
    		class Program
    		{
    			static void Main(string[] args)
    			{
    				//Get the ConfigureSystem
    				IConfigureSystem configSystem = RuntimeFactory.GetConfigureSystem("Sample");
    				//Create the DataReader parameter
    				DataReaderParameter parameter = new DataReaderParameter()
    				{
    					IspecName = "ISP1",
    					IspecValue = ConfigurationStatus.Enable,
    					ReportName = "REP1",
    					ReportValue = ConfigurationStatus.Enable,
    					OnlineValue = ConfigurationStatus.Disable,
    					ReportsValue = ConfigurationStatus.Disable
    				};
    				//Set DataReader configuration
    				StatusInfo status = configSystem.SetDataReader(parameter);
    				//Multi configuration
    				//Create Multi parameter
    				MultiParameter parameter = new MultiParameter()
    				{
    					IspecName = "ISP1",
    					IspecValue = 20,
    					ReportName = "REP1",
    					ReportValue = 10,
    					OnlineValue = 20,
    					ReportsValue = 20
    				};
    				//Set Multi configuration
    				status = configSystem.SetMultiBehavior(parameter);
    				//Configure COM+ settings of Sample
    				//Create the ComponentProperties parameter
    				//Create users list
    				IList<string> users = new List<string>();
    				users.Add( User1 );
    
    				IList<ComponentRoles> rolesList = new List<ComponentRoles>();
    				ComponentRoles role = new ComponentRoles()
    				{
    					RoleName =  Application Administrators,
    					UserNames = users
    				};
    				rolesList.Add(role);
    
    				ComponentProperties parameter = new ComponentProperties()
    				{
    					ApplicationPoolSize = 3,
    					RecycleLifetimeLimit = 10080,
    					RecycleMemoryLimit = 750000,
    					RecycleExpirationTimeout= 20,
    					MinimumPoolSize = 5,
    					MaximumPoolSize = 5,
    					Roles = rolesList
    				};
    				//Set COM+ configuration
    				status = configSystem.SetComponentProperties(parameter);
    				}
    		}
    }

Definition of the IConfigureSystem Interface

Following is the definition of the IConfigureSystem interface:

namespace Unisys.AgileBusiness.RuntimeAPI
{
		public interface IConfigureSystem
    {
			StatusInfo SetComponentProperties (Unisys.AgileBusiness.
			RuntimeAPI. ComponentProperties properties);
			StatusInfo SetDataReader(Unisys.AgileBusiness.RuntimeAPI.
			DataReaderParameter parameter);
			StatusInfo SetMultiBehavior(Unisys.AgileBusiness.RuntimeAPI.
			MultiParameter parameter);
			StatusInfo SetPhasedSql(Unisys.AgileBusiness.RuntimeAPI.
			PhasedSqlParameter parameter);
			StatusInfo SetTransactionIsolationLevel(Unisys.AgileBusiness.
			RuntimeAPI. TransactionIsolationLevelParameter parameter);
		}
}