User Defined Module editor


This section provides a detailed description of the User Defined Module editor. This editor essentially provides a means for you to configure your User Defined Modules or to view the contents of an Automatic Module.

User Defined Modules are used extensively in the CAST Engineering Dashboard as a means to configure analysis content into meaningful groups or sets - indeed objects cannot be seen in the CAST Engineering Dashboard if they are not part of a Module (whether Automatic or User Defined). As such the editor provides a means to set up an Object Filter on your analysis results source code (using the Technology, Analysis Units, Object Types and Object Names filter criteria) in order to define the content you require.

Notes

  • It is NOT necessary to create a User Defined Module and associated Filter prior to the generation of a Snapshot. By default an Automatic Module will be created automatically for you: it will contain all your Analysis Units for the Application and will be called "<Application name> full content".
  • By default, a new User Defined Module will be provided with an empty filter called "My Object Filter". This filter contains no configuration at all, however, if left as is, it will return all objects associated with the Application (identical to the Full Content module - see the Modules tab). This is of particular importance if you choose to configure an Explicit Content filter - if the empty "My Object Filter" is left then it will override any Explicit Content filters you create and return all objects (note that you can use Filters and Explicit Content filters together - see CMS - Information about Object Filters/Explicit Content in a User Defined Module.

Main Field Headings
Module Name
Displays the name of the Module (whether Automatic or user Defined) - note that for ease of recognition, CAST recommends using a naming convention which can be easily understood. You can edit the field by selecting it and then modifying or replacing as appropriate. Please see Naming constraints for more information.

Notes

  • the name defined here will also be used in the CAST Dashboard.
  • you cannot modify the name of an Automatic Module
Module content overview
This option allows you to view all the objects that belong to the Module (whether Automatic or user Defined) - it uses all the filters you have created for this User Defined Module. CAST recommends using this option before you put the User Defined Module into production:

The Objects Summary tab displays a list of all the object types that are part of the Module and their quantity. The Objects Details tab displays a list of each object that is part of the Module.

This option requires that you have already run an analysis or have generated a Snapshot otherwise it is not possible to view the objects that are part of the Module.

Filters tab

The Filters tab enables you to create new and edit existing Object Filters defined for the parent User Defined Module on your analysis results source code. You can use this tab in conjunction with the Explicit Content tab - see Hierarchy of Object Filters/Explicit Content in a User Defined Module for more information about how the two tabs function together.

The tab features a table displaying any existing Object Filters, and multiple sections enabling you to edit or define an Object Filter. If you are viewing an Automatic Module, then all fields are disabled.

Object Filters table

The Object Filters table lists all the Object Filters that form the parent User Defined Module. If you have just created a new User Defined Module, one object filter called "My Objet Filter" will be created for you.

Adds a new Object Filter to the list. Note that you can create multiple Object Filters for one User Defined Module - please see Hierarchy of Object Filters/Explicit Content in a User Defined Module for more information about how multiple filters function.
Removes an existing Object Filter.

To edit an existing Object Filter, select the Object Filter in the list - you can then fill in the relevant filter fields explained below.

NameDisplays the name of your Object Filter - note that for ease of recognition, CAST recommends using a naming convention which can be easily understood. You can edit the field by selecting it and then modifying or replacing as appropriate. Please see Naming constraints for more information.
Filter selection overviewThis option allows you to view all the objects that match the current Object Filter, taking into account all filter types that you have used. CAST recommends using this option before you put the User Defined Module into production. It functions in exactly the same way as the Module content overview option explained above.

This option requires that you have already run an analysis or have generated a Snapshot otherwise it is not possible to view the objects that match the filter.

Notes

Technology Selection

This filter type is optional. It enables you to filter on specific Technology types - in other words all objects and their children attached to the current Application that belong to the chosen Technology.

If you want to filter on Technology types, click the Select button to choose the Technology you require. Only Technologies that are part of the parent Application will be available for selection as a filter.

If you do not want to filter on Technology types ensure that <None> is displayed - use the Remove button to remove an existing selected Technology.

Analysis Units Selection

This filter type is optional. It enables you to filter on specific Analysis Units - in other words all objects and their children that belong to the chosen Analysis Unit.

Filter ModeDon't filter on analysis unitsWhen selected, the filter is deactivated.
Filter on analysis unitsSelecting this option enables the filter.
Analysis Units

Use this button to select the Analysis Unit(s) you want to include in the filter. A dialog box will be displayed enabling you to select the Analysis Units you require. Only the Analysis Units attached to the current Application will be available for selection.

Use this button to edit the selected Analysis Unit. The corresponding Analysis Unit editor will be displayed.
Use this button to remove an existing Analysis Unit from the filter.

Type Selection

This filter type is optional. It enables you to filter on specific object types - in other words all objects and their children that match the selected object type.

Filter ModeDon't filter on object typesWhen selected, the filter is deactivated.
Filter on object typeSelecting this option enables the filter.
Selected Types

Use this button to select the Object Types you want to include in the filter. You will be offered the choice of three options:

  • Add from usual types > Offers only the most commonly used object containers that are part of the current Application

  • Add from applicable types > Offers all object types that are part of the current Application

  • Add from all available types > Offers all object types supported by CAST regardless of whether they are part of the Application

Each option will display a dialog box enabling you to select the object types you require.

Use this button to remove an existing Object Type from the filter.

Name Selection

This filter type is optional. It enables you to filter on specific object name patterns (object full name, object name and object full path) based on a Regular Expression - in other words all objects and their children that match the selected object name pattern.

Filter ModeDon't filter on object typesWhen selected, the filter is deactivated.
Filter on object typeSelecting this option enables the filter.
Expression

Use this button to add a new pattern/expression. A new entry will appear in the list and fields under the list will be displayed allowing you to configure the pattern:

PatternEnter the string or expression you want to match.
Field
Choose the option you require:
  • Object Name (as stored in the Analysis Service) - the object's short name, for example for a database object this would not include the host and server name.
  • Object Full Name (as stored in the Analysis Service) - the object's full name, for example for a database object this would include the host and server name, plus any dots between the names.
  • Object Path (as stored in the Analysis Service) - the path to the storage location of the object.

Notes

  • CAST highly recommends consulting the CAST System View "CSV_FILE_OBJECTS" located in the CAST Analysis Service to find out how file names and paths have been recorded.
  • Note that when using the filter based on an object's path (as stored in the Analysis Service schema), some objects (notably Java Packages) are not saved with a path, therefore these objects will not be included in the module.
OperatorChoose the operator you require:
  • EQUAL - use this option to exactly match the Pattern you enter (equivalent to the "=" in SQL)
  • LIKE - use this option in conjunction with the % operator to match similar objects (equivalent to the "LIKE" in SQL):
    • The pattern sales% on Object Name will return objects such as sales, salesdetails, salesaddresses
    • The pattern %.%..%uth% on Object Full Name will return objects such as CEMAES.CASTPUBS..AuthorIDCodes, CEMAES.CASTPUBS..on_delete_authors
    • The pattern %.frm on Object Path will return all objects whose path ends in .frm
  • MATCH (Perl Regular Expression) > Use this option if you require a more complex pattern based on a Regular Expression.
Use this button to remove an existing Expression from the filter.
Explicit Content tab

This tab allows you to define a specific list of objects that will be included in a Module. You can use this tab in conjunction with the Filters tab - see Hierarchy of Object Filters/Explicit Content in a User Defined Module for more information about how the two tabs function together.

The list of objects is determined by the insertion of an SQL query that will be run against the CAST Analysis Service and include any objects that match your query:

To activate this option, please ensure that you tick the Build module content using an explicit list of objects.

The SQL query that needs to be inserted into this dialog box must use a CAST pre-defined format. The basic format is as follows and is already inserted into the query field.

Delete From CI_OBJECTS_SET

Where SET_NAME = '$(ModuleName)'
go Insert Into CI_OBJECTS_SET(SET_NAME, OBJECT_ID, ERROR_ID)
Select '$(ModuleName)', o.OBJECT_ID, 0
From CDT_OBJECTS 0
Where /*fill where clause here*/
go

This query essentially does the following:

  1. Empties the CI_OBJECTS_SET table in the CAST Analysis Service of any existing entries pertaining to the current User Defined Module you are working on (this is determined automatically by the $(ModuleName) macro).
  2. Inserts new data into the CI_OBJECTS_SET table that determines which specific objects must be included, based on:
    • the CDT_OBJECTS table in the CAST Analysis Service (a table that lists all objects that have been saved into the CAST Analysis Service as a result of analyses that have been successfully completed)
    • a WHERE clause that lets you extract specific items from the CDT_OBJECTS table

Example

To specify ALL objects in the CAST Analysis Service that are "SQL Tables", modify the standard Module Content template by adding the text in red in the WHERE clause:

Delete From CI_OBJECTS_SET Where SET_NAME = '$(ModuleName)'
go Insert Into CI_OBJECTS_SET(SET_NAME, OBJECT_ID, ERROR_ID)
Select '$(ModuleName)', o.OBJECT_ID, 0
From CDT_OBJECTS o Where go

Editor buttons

The following buttons are available in the view:

Minimize > Minimize the entire window
Maximize > Maximize the entire window
See Also

Hierarchy of Object Filters/Explicit Content in a User Defined Module | Define a User Defined Module


CAST Website