Page tree
Skip to end of metadata
Go to start of metadata

Summary: this section explains how to manage specific tools that can be run before or after an analysis to enrich the content of the final snapshot or achieve a specific aim.

Introduction

To access to the panel, click Advanced within the Application - Config section. Available tools are explained below.

Click to enlarge

Options

This sections lists all the tool "jobs" that will be run immediately after an analysis has completed, but before the snapshot is generated:

Click to enlarge

Click to add a new tool job, see below.
NameName of the tool.
TypeIndicates the type of tool that will be run.
Will be processedThis toggles the tool job:
  • ENABLED > The tool will be run after the analysis - by default all newly created Tools will be set to ENABLED
  • DISABLED > The tool will NOT be run.

When a tool is set to DISABLED, this is usually a temporary action. You should delete the tool if you want to permanently remove it.

Edit the existing tool.

Delete the tool.

Adding a tool

Click the  button - a new form will be displayed:

Click to enlarge

NameEnter a name for the tool.
DescriptonEnter a description.
Will be processedThis toggles the tool job:
  • ENABLED > The tool will be run after the analysis - by default all newly created Tools will be set to ENABLED
  • DISABLED > The tool will NOT be run.

When a tool is set to DISABLED, this is usually a temporary action. You should delete the tool if you want to permanently remove it.

Insertion Mode

Choose the job type:

KB Update SQL Tool

The KB Update SQL Tool provides (as its name suggests) a means to modify the content of the Analysis schema (also known as the Knowledge Base) after an analysis has been completed. There are many reasons for this requirement, but to give you some examples of how the assistant could be used:

  • Update links that have been omitted by analyzers when dynamic programming is in use
  • Update erroneous links identified by grep searches
  • Managing specific situations (e.g. Java frameworks)
  • Overcoming specific limitations inherent in a CAST analyzer (for example searching using the parent type and not just on the object name ("class.function()" calls in the Universal Analyzer), ability to handle virtual functions and the ability to ignore links)

The following processes are possible with the assistant:

  • Add a new object
  • Add a new parent link (Belongs To) to an object
  • Add/modify/delete the property of an existing object
  • Delete existing links
  • Delete existing objects

A set of entry tables in the Analysis schema must be injected with the relevant data that will modify the data. When the KB Update SQL Tool is then run, a specific stored procedure (also located in the Analysis schema) is called which will carry out the update using the data in the entry tables.

For more detailed information see Update CAST Knowledge Base Tool.

ParametersNot currently used.
SQL Code editor

Enter the SQL code to be executed in this section. Only standard SQL is supported.

Use of section sign §

In AIP Console  1.22, the section sign § (HTML code §) MUST be used as a variable in front of any table name. This character will be replaced by the name of the Analysis schema (attached to the current Application) with a dot separator. For example, this code is acceptable:

Insert into §CI_OBJECTS_SET(SET_NAME,OBJECT_ID,ERROR_ID) 
Select distinct '$(ModuleName)',o.OBJECT_ID,0
From §CDT_OBJECTS o 
where OBJECT_ID in ( select distinct cf.OBJECT_ID                   
                     from §CSV_FILE_OBJECTS cf                   
                     where upper(FILE_PATH) like '%\\JEE\\CLIENT\\%')

In AIP Console ≥ 1.23, the section sign is no longer required in front of any table name. Any referenced tables will be assumed to belong to the current Application's Analysis schema.

Run ToolThis button is disabled until the form has been successfully saved. Once saved, you can use this button to execute the current tool.
Save and Run

This button will:

  • first validate the queries (see below)
  • if the validation process detects errors in the form, these errors are displayed underneath the editor and will need to be corrected before the form can be saved.
  • if no errors are found the data in the tool is saved
  • the tool is then executed immediately
Save

This button will:

  • first validate the queries (see below)
  • if the validation process detects errors in the form, these errors are displayed underneath the editor and will need to be corrected before the form can be saved:

  • if no errors are found the data in the tool is saved

SQL editor validation

When the form is saved (Save button is clicked), all the SQL queries are checked for syntax errors. Then, the queries are checked against a list of allowed query rules, as follows:

  • The changes are allowed only on specific tables in the Analysis schema (those with the "ci_" prefix) and temporary tables (with "maint_tmp_" prefix)
  • SELECT - it is permitted to select from any table. If select is used with a function, then only the "droptemporarytable" function is allowed and only with a temporary table name parameter
  • INSERT INTO - insertion is permitted only into Analysis schema tables or temporary tables
  • UPDATE / DELETE - only temporary table records can be updated or deleted
  • CREATE TABLE / DROP TABLE - only temporary tables can be created or deleted
  • Only statements mentioned in this list are allowed
  • Subqueries are also validated

Changes made

Any changes made in the Update Application schema page (e.g. adding a new tool job) will cause a banner to appear at the top:

This indicates that the changes you have made will impact your analysis results and therefore that the data that is used for the Architecture Studio, Transaction configuration and upload to CAST Imaging will not be up-to-date. Clicking the Update button in the banner will run a special step called Prepare analysis data that should complete relatively quickly (more quickly than a full analysis or snapshot) and ensures that the data used by the Architecture Studio, Transaction configuration and upload to CAST Imaging is up-to-date based on the changes you have made. 

This step is always actioned when you either run an analysis (without a snapshot) or generate a new snapshot. When the Prepare analysis data step is complete, the banner will no longer be displayed.

  • No labels