Summary: this section provides instructions for working with existing Architecture or Quality Rule Models in the Architecture Studio.

Available options

Architecture Model

Quality Rule Model

Options:

Use this to search for a specific model. Search will be performed on the file name and/or the ID of the model. The list of models will be filtered based on the search term entered.

This option is used to select a context when running a Check a model on a specific model using the check icon:

The drop down list will display a Global context option by default (when set to Global, the check icon will not be available) and then a list of all Applications that are being managed in Console. Selecting a specific Application will enable the check icon and allow you to perform a check against the selected Application using the selected model.

The context selected here will be replicated in the Model editor (although this can be changed in the editor):

Technically, selecting an application will load the appropriate metamodel and use this in the check process. The Global context is therefore simply to allow the creation of a model for no particular application.

Only available when working with Architecture Models.

This option filters Architecture Models that are set as critical via their properties - see AIP Console - Architecture Studio - Model editor.

Metric IDA unique identifier for your model. This ID is used to identify the Model throughout the CAST dashboards.

Name

Name of the existing Model that can then be attached to a specific Application/version for inclusion in the next analysis - see Application - Config - Architecture for Architecture Models. Rolling your mouse pointer over the name of the model will reveal the Description assigned to the model:

File Name

Name of the .castarchitect/.castrule file name assigned to the model. Files are stored in the following location:

≥ 2.x
\\share\Public\aip-node-data\common-data\upload\architecture\models

1.x
%PROGRAMDATA%\CAST\AipConsole\AipConsole\upload\architecture\models

Note:

  • for Models created from scratch in the Console, the file name will automatically take the form "<Name>.CASTArchitect" or "<Name>.CASTRule"
  • for imported Models, the file name will have been determined when the Model was saved in the end-user application CAST Architecture Checker
  • File names cannot be changed.
  • You will alerted if you attempt to create or import a Model with the same name as another Model that is already present in the list.
Last ModifiedDisplays the date the model was last modified. For imported Models that have not been subsequently modified in Console, the date the model was imported will be displayed.
Weight
Only available when working with Architecture Models.

Displays the Weight applied to the corresponding rule. This value defines how "important" the rule is in the parent Technical Criterion "Architecture Models Automated Checks". See AIP Console - Architecture Studio - Model editor for more information.

Last Published

Displays the date the model was last published as an extension. See AIP Console - Architecture Studio - Publishing models.

This icon indicates that the model has been modified since the last time it was published. You can re-publish it to generate a new extension containing the changes to the model.

1

Publish

See AIP Console - Architecture Studio - Publishing models.

2

Check

See Check a Model below.

3

Options

Edit

Use this option to edit the Model in the Model editor (you can also click the item's row to open the editor):

Download

Use this option to download the Model (whether created from scratch or imported from file) to .castarchitect./.castrule file (this file can then be loaded in CAST Architecture Checker).

Remove

Use this option to remove the Model. Removing a Model cannot be reversed. Ensure you download the .castarchitect./.castrule file if you need to re-use the model.

  • If a model which is attached to an Application (see Application - Config - Architecture) is removed from the Architecture Studio, it will still be available on the associated Node. In this case user has the possibility to download it from the Application configuration and upload it again in the Architecture Studio.
  • Once a model is removed, it can not be recovered.

Create a Model from scratch in Console

This option enables you to create a brand new Model/Library Component using the interface available in Console. Choose the configuration settings for the new model, then click OK to start the editing process - see AIP Console - Architecture Studio - Model editor for more information:


Authorized / Forbidden
Only applicable when creating an Architecture Model.

Choose the type of model you would like to create:

  • a model defining Authorized links between layers - i.e. links between objects that are authorized
  • a model defining Forbidden links between layers - i.e. links between objects that are forbidden

Authorized model type

  • When two layers have no links between them in the model and in reality there are links, then a violation will be reported.
  • If a link between two layers is created in the model, then no violations will ever be raised regardless of whether in reality links exist or not.

Forbidden model type

  • When two layers have no link between them in the model, whatever the reality is, no violations will be reported.
  • Violations will be reported only when a link between two layers is created in the model and in reality the link exists.
NameEnter a name for the model/Library Component.

Note that you can also create a model using a Product or user-defined template as a starting point. Use the following icon in the Templates section. See also Create an Architecture Model from a template

Check a Model

The Console can run a check of your Model against the current Application (ensure you choose an application in the drop down context list) so that you can see any violations of the current Model. A snapshot is required, but the Model does not need to have been "attached" to a specific Application/version or published as an extension for the results to show:

Results of the check will be shown as below - each violation of the rule is shown in one row of information (the example below is for a model that forbids a dependency from Java client code to SQL database code):

Click to enlarge

Information about the results:

  • the two layers involved
  • the number of links identified between the two layers
  • a description of the model (when rolling the mouse over View Model Description)

1Search for an object in the list.
2

Download a report in Microsoft Excel format about the results of the model check, containing:

  • Application name
  • Model name and description
  • Report date and time 
  • number of violations
  • List of violations
3

Choose additional columns for display:

The Dynamic Info column displays information about any links that are considered Dynamic (a tick is present in the Dynamic column):

  • Inference Engine - this indicates that the analyzer has inferred that this link exists based on its inference engine capabilities (i.e. link detection in variables, function parameters, function returns, and instance variables)
  • Grep-Validated - this indicates that the link has been created based on the names of objects and the link has already been validated as true
  • Grep-Not Reviewed - this indicates that the link has been created based on the names of objects and the link has not been validated yet
4

Use this option to filter the contents of the list based on the name of the layer, object names, types etc. - this can be useful if the list is very large:

Caller layerThe name of the Layer in the model the caller object belongs to.
Caller nameThe name of the caller object
Caller typeThe caller object type.
Caller pathFull path to the caller object.
Callee layerThe name of the Layer in the model the callee object belongs to.
Callee nameThe name of the callee object
Callee typeThe callee object type.
Callee pathFull path to the callee object.
Link typeType of link between the two objects.
Dynamic

A tick in this column indicates that the link is a Dynamic Link (see Validate Dynamic Links).

Specific piece of code on the caller side in which the link to the callee object is defined. To view the code, select the link in the list.

Note that ≥ 2.0.0-funcrel includes the ability to cancel the check action if the action takes too long to complete: after 30 seconds have elapsed, the close editor icon will be enabled, allow you to cancel the action:

 

Run a check on part of the model

It is possible to run a check on part of the model (e.g. specific Layers or Sets) rather than the entire model. To do so, select the Layers/Sets you want to check using the CTRL key and the mouse - a green dashed border indicates the selected items:

Click the Check Model button to start the check:

Results are displayed directly in the viewer with the number of matched items updated and any violations are also displayed:

Note that the yellow dashed border indicates that these layers (that were selected for the partial check) involve dependent sets.