Transaction and Function Point management - Transaction configuration

Introduction

This step builds the transactions implemented in the application. This is done by creating specific rules for Transaction Entry Points and End Points as well as for the identification of Data Entities. There are two methods of doing this:

Console: Transaction UI

Available in Console after an initial Application analysis has been completed. Documentation is available in Application - Transactions:

CAST Transaction Configuration Center (TCC)

This is a standalone tool (CAST-TransactionConfig.exe) available in the AIP Core installation folder. Documentation is available in CAST Transaction Configuration Center (TCC):


Several concepts and their associated steps are used during the transaction configuration phase:

  • Configure Transaction Entry Points: this step describes defining rules to select any kind of interface with end-users or other applications.
  • Configure Data Entities: this step describes defining rules to select any kind of data persistence layers within the application
  • Configure Transaction End Points: this step describes defining rules to select any kind of data persistence layer which are not part of the application (they belong to other applications) and are not delivered with the source code. As such, they should be considered as Transaction End Points.
  • Configure Excluded items: defining rules to exclude specific elements (Data Entities or Transaction Entry Points) from the application boundary.

In each step you can define four types of rules, depending on the objects you need to address:

  • By naming: search for objects using their name
  • By inheritance: search for classes and interfaces using the inheritance links they can have
  • By type: search objects through their type
  • Free Definition: define complex rules to search for objects, based on names, types, links, and properties
ConsoleCAST Transaction Configuration Center

Note that:

  • this document discusses creating rules in the Templates node. Changes here are not automatically applied to existing Applications, therefore you will need to export the changes to .TCCsetup and then import them into your Application.
  • CAST highly recommends that a snapshot is successfully generated prior to using the CAST Transaction Configuration Center to ensure that the most recent Function Point results and statistics are available for calibration. However, if only an analysis has been completed, the CAST Transaction Configuration Center will prompt you to run a special one-time action known as the pre-snapshot preparation action that will ensure that the data you are calibrating is up-to-date:

Predefined configuration rules delivered with AIP Core and extensions

Note that the predefined configuration rules discussed below are also available through the SME KIT - Transaction Configuration Kit - if you are using AIP Core ≥ 8.3.x there is no need to download and install this extension as the rules are already provided out-of-the box.

AIP Core ≥ 8.3.x and some extensions are delivered with a set of predefined configuration rules that are designed to meet the majority of simple use cases. You can see these predefined rules as follows:

Console

Click to enlarge

CAST Transaction Configuration Center (TCC)

Click to enlarge

Or you can view them in the Application > Transaction Configuration node:

Click to enlarge

The number of objects that match these predefined configuration rules is also displayed:

Console

CAST Transaction Configuration Center (TCC)

In the Application > Transaction Configuration > sub node > Free Definition node:

CAST recommends that you check whether the predefined rules and the objects that have been matched are appropriate and to avoid creating duplicate rules. If you find that the rules are not appropriate, you can deactivate the predefined rule:

Console

CAST Transaction Configuration Center (TCC)

or in the Application > Transaction Configuration node:

Click to enlarge

Configure Transaction Entry Points

The first action is to find the Entry points rules. This step aims to register the default interface automatically used by the system to identify transaction entry points. The result of this operation is a list of transactions that will be reviewed by the SME to ensure you do not miss any interfaces.

Console

CAST Transaction Configuration Center (TCC)

In the Templates node:

Adding new Transaction Entry Points via Free Definition rules

This type of rule is very powerful and generally allows you to address most situations you may be confronted with. In Console, this method of searching for specific objects to define as Transaction Entry Points is the only method available:

Console

CAST Transaction Configuration Center (TCC)

Other methods available in CAST Transaction Configuration Center

Searching for objects using their type

Click here to expand...

The CAST Transaction Configuration Center is initialized with a set of predefined object types under the node By type:

You should first review this list to avoid creating duplicate rules. You can also add rules to select new objects as Transaction Entry Points. For example, for the Mainframe technology, JCL Jobs and CICS Transactions are considered as Transaction Entry Points by default but if the application uses BMS map, then you can add a rule to select this type of objects as a Transaction Entry Point.

If you have to deal with a subset of types such as a certain category of jobs or programs, then you should use Free Definition rules (instead of adding a new type) in conjunction with exclusions to clean up selected objects.

Searching for objects by using their inheritance

Click here to expand...

If the technology does not allow you to select objects by their type, then you can opt for another approach. As an example, an implementation based on Java Swing can be handled by selecting the super class as the root of the Transaction Entry Point. Defining By inheritance rules for JFrame and JPanel classes will automatically select screens existing in the application.

CAST recommends using Free Definition rules instead of By Inheritance rules if the selection of the parent class must be done by name and not full name. You will obtain more accurate results using Free Definition rules:

Searching for objects by their name

Click here to expand...

Selecting Transaction Entry Points using their name should be the last resort option since this is a declarative approach. It forces you to keep a specific task as part of the on-going process to regularly verify with the SME whether you need to add a new Transaction Entry Point to your set of rules:

Configure Data Entities

Data Entities should be the type of elements to consider as part of the persistence layer. These elements should contain the data such as the tables or flat files. Any temporary files or objects should NOT be targeted in this step.

Console

CAST Transaction Configuration Center (TCC)


Predefined data entities

Console and the CAST Transaction Configuration Center are initialized with a set of predefined object types and rules in the Built-in types and Free Definition nodes. You should review this list to avoid creating duplicate rules:

Console

CAST Transaction Configuration Center (TCC)

Adding new data entity rules via Free Definition rules

You can add rules to select new objects as Data Entities. When using Console, Free Definition is the only method available:

When using CAST Transaction Configuration Center (TCC), you can use any of the following, although By naming and By inheritance are not recommended for Data Entities:

Tables to ignore

You should also review the list of patterns predefined in the "built-in" section. These rules will automatically exclude elements from the calibration. These Data Entities will not be displayed in any list (kept, ignored, or deleted Data Entities):

Console

CAST Transaction Configuration Center (TCC)


Configure Transaction End Points

The next step of the interface review and configuration is to ensure you have the right definition of Transaction End Points. In this part we intend to review the potential interfaces of the application you are on-boarding. If the application is using specific APIs or web services exposed by another application, then you should configure those end points.

The approach will be to review the interface with external APIs in order to pick up all of those that interact with a persistence layer such as a file, an outputStream, inputStream, MQueue, Mail, FileStream, writer, reader... All these APIs should be configured as a Transaction End Point with a contribution set to 1. Other APIs that do not represent a persistence layer should be configured with a contribution set to 0.

A set of predefined Transaction End Point rules are available out of the box:

Console

CAST Transaction Configuration Center (TCC)


Adding new Transaction end points rules via Free Definition rules

Free Definition rules are an extremely powerful method of configuring Transaction End Points. Using this approach you should consider the population you are targeting in other applications (ex: web services, message Queues, API, ...). The Transaction End Points are the elements that call this population:

Console

CAST Transaction Configuration Center (TCC)

Other methods available in CAST Transaction Configuration Center

Searching for objects using their type

Click here to expand...

This is a simple selection that can be done to identify unresolved objects or some objects that have been generated by a Universal Analyzer configuration:


Searching for object using their name

Click here to expand...

This type of rule is generally used with legacy technologies such as Mainframe to select specific programs that are used to implement functionalities outside the application. In this case these objects are normally in the list of unresolved programs and it is easy to select those that are required:

Searching for objects using their inheritance

Click here to expand...

CAST recommends using Free Definition rules instead of By Inheritance rules if the selection of the parent class must be done by name and not full name. You will obtain more accurate results using Free Definition rules:

Add new Transaction End Points from external APIs

Some external classes can be considered as APIs provided by other applications. In the current application, objects calling these APIs can be considered as Transaction End Points. Moreover, those that call APIs managing data flow contribute to transaction weight. Creating rules to handle these objects can be done in several steps:

  • Search for external classes
  • Identify those that process data flow
  • Generate the list of objects to be added to the Free Definition rule selection criteria
  • Create the Free Definition rules

Search for external classes

External JEE APIs used by the application

The following SQL query collects Java methods used as APIs:

SET Search_path=<Prefix>_local;
 
SELECT DISTINCT OBJ.object_fullname
FROM cdt_objects OBJ, OBJPRO EXT
WHERE  EXT.IDOBJ = OBJ.OBJECT_ID
     AND  OBJ.object_language_name = 'Java'
     AND OBJ.object_type_str = 'Java Method'
     AND EXT.Prop = 1
     AND OBJ.object_name NOT LIKE '_jspService'
ORDER BY object_fullname ASC;

Search for external .NET APIs used by the application

The following SQL query collects .NET classes used as APIs:

SET Search_path=<Prefix>_local;

SELECT DISTINCT OBJ.object_fullname
FROM cdt_objects OBJ, OBJPRO EXT
WHERE  EXT.IDOBJ = OBJ.OBJECT_ID
     AND  OBJ.object_language_name = '.NET'
     AND OBJ.object_type_str like '%.NET Class'
     AND EXT.Prop = 1
ORDER BY object_fullname ASC;

Identify external APIs that process data flow

Review the objects identified in the previous step and identify those that process data. They can then be added to a specific Free Definition rule for Transaction End Points defined with a contribution set to 1. Add the name of the objects that have been identified in the following SQL query selection criteria:

SET Search_path=<Prefix>_local;

SELECT DISTINCT '<value>'||OBJ.object_fullname||'</value>' as pattern, count (1)

FROM cdt_objects OBJ, OBJPRO EXT, ctv_links CLI
WHERE  EXT.IDOBJ = OBJ.OBJECT_ID
     AND  OBJ.object_language_name = '.NET'
     AND OBJ.object_type_str like '%.NET Class'
     AND EXT.Prop = 1
     AND CLI.called_id = OBJ.OBJECT_ID
     --AND OBJ.object_fullname like '%Stream%'
     and object_fullname not in ('<Replace With The Content Of Your Free Definition With A Contribution at 1>')
     GROUP BY 1 having count(1)< 10000 
ORDER BY 2 DESC;

The result produced by the execution of the query should look like this:

You can now create a new dedicated Free Definition rule to select Transaction End Points corresponding to external APIs. You could call it "Exposed Program" for instance. Once it has been created, replace the regular expression implemented in the rule by using the following SQL query (matched to your environment) in which you insert the list of objects you obtained previously:

set search_path=<Prefix>_mngt;
 
update cal_objsetdef set setdefinition = '<set>
  <selection-criteria subobjects="no" externalobjects="yes">
   <property name = "fullname" operator = "like" >
    <value>...</value> -- result of the previous query
   </property>
  </selection-criteria>
</set>
' where setname = '<Replace With The Name Of Your Free Definition>';

The result is visible in the CAST Transaction Configuration Center, in the definition of the rule:

You can now create a Free Definition rule to select the Transaction End Points that call the external API processing data:

Configure Excluded Items

If you need to specifically exclude certain items from the Application boundary, you can do so by using the Excluded Items section:

Console

CAST Transaction Configuration Center (TCC)



How to reuse and merge CAST Transaction Configuration Center configurations

Each application is specific in terms of technologies and frameworks. A significant part of the effort in configuring transactions is to cover common and specific technologies. A CAST Transaction Configuration Center configuration library will help you to configure the common part, meaning that you can focus on the specific part. In order to build your CAST Transaction Configuration Center default configuration you should use the following instructions:

Console

Use the import/export options to export rules to file to store outside of Console. Then use the import option when you need to re-use the same rule:

CAST Transaction Configuration Center (TCC)

Check the list of technologies and frameworks used in the Application

The first simple action you can do if you do not know the technologies used by your application, is to open the CAST Transaction Configuration Center and select the Application as shown below. Use the tables at the bottom of the right hand panel to get a list of all the object types that have been identified in the application:

Click to enlarge:

The above tables allow you to understand the technologies used by your application. If you want to import the configuration for additional frameworks and API, then you should use CAST Enlighten (as shown below) or execute an SQL query to list all the external and internal classes, package per package:

Click to enlarge:

Update the Templates section with a .tccsetup file

The first step is to select the Templates node in the CAST Transaction Configuration. It is important to ensure that the template is empty (apart from the default items in the Entry points > By Type and Data Entities > Ignored Tables nodes) in order to not propagate previous configurations. If you want to start from a clean environment, you must export a clean configuration from another environment and import it into the Templates node before continuing:

Click to enlarge:

Next, right click the Templates node and select Upload configuration in the popup menu to enrich the existing configuration. The below actions can be done multiple times if you have several technologies in your application and need to upload multiple custom tccsetup files:

In the following example, we willl import a custom configuration for Mainframe:

When a configuration has been uploaded, you can see new rules for Data Entities, Entry Points, End Points, and Excluded Items appearing on views associated to the Templates node. The upload action prevents duplicates: a configuration cannot be imported/uploaded twice:

The following screen shot displays an example of a custom configuration that has been imported/uploaded:

Export your final default configuration

Once your configuration is ready to be used with Applications, right click the Templates node and select Export configuration:

Save your configuration in a file:

Import your TCC configuration file into the Setup node of your application

Once the configuration has been saved, select your Application and expand it to find the Transaction Configuration node. Right click this and select Import Configuration:

Keep in mind that this operation will replace the current configuration in your Application with a new one. If you need to merge a specific configuration with the one you want to import, then you must perform this operation in the Templates node. To do that, export the configuration defined for your application and upload it into the Templates node.


 Import the configuration file in to your Application: