• When running Console in CAST Imaging mode (i.e. using the dedicated AIP Core for CAST Imaging) the Quality Rule Models tab is not available.
  • Publishing Architecture Checker models is available in ≥ 2.4.x.

Introduction

Models (both Architecture Checker and Quality Rule models) must now be published as a "custom extension" in order to be made available for all Applications managed in Console. The custom extension can then be included in an analysis and the "rules" in the extension (i.e. the model) will be checked during the next analysis (results are made available in the CAST Dashboards like for standard CAST rules). This page explains how to publish models as an extension and re-use them in an analysis.

Publishing the model

Publication consists of:

  • creating an installable extension from the Model
  • making the extension available to all Nodes

You can then decide whether to include and install this extension in your application(s).

Note that publication does NOT publish the "extension" on CAST Extend or CAST Extend local server - instead the extension is made available internally within Console.

Step 1 - Define the model properties

Before you can publish the model as an extension, you will need to define some properties for this model. To do so, edit the model you want to publish:

Now click the Model Properties option in the editor:

You should then ensure that the following properties are defined - any missing properties will cause the publication process to fail:

  • Model > Metric ID
  • Model > Name
  • Model > Description
  • Documentation > All fields to be filled - Note that starting from CAST Console 2.9, all Documentation fields are pre-filled with "TBD" so that the model can be published even if the Documentation is not fully ready.
  • Technical Criteria (Quality Rule models only) > At least one technical criteria needs to be selected to position the rule correctly in the Assessment Model

Note that it is not mandatory to define:

  • Assessment Model (Architecture Checker  models only) > a default weight will be applied but the resulting rule will not be considered "critical"
  • Technologies (Quality Rule models only) > if you do not define specific technologies for your rule, the rule will be triggered regardless of the technologies that are being analyzed, therefore potentially impacting performance of the analysis
  • Grade Thresholds (Quality Rule models only) > A default set of thresholds will be used, but you can modify these if you wish

Click Update to save the properties, then save the model itself:

Finally, close the model editor:

Step 2 - Publication

Click the Publish icon for the model you want to publish:

Or alternatively (in Console ≥ 2.10), use the check boxes to choose the all the models you want to "bulk" publish and then click the bulk Publish icon:

The publication process then begins. If any errors are found in the model, for example properties not filled in or an empty scope set in the model, then the publication will fail. A message is displayed in the bottom left corner of the screen, detailing the error (in this case you will need to resolve the error, usually by filling in the missing properties):

Metamodel check

During the publication process, a metamodel check is actioned to ensure that the rule in the resulting extension is coherent. More precisely, this check will look to see if the model uses a metamodel type/property (i.e. in the "Scope" set) which is not defined in the application metamodel - if a type/property like this is found, then the publication will be blocked. This could occur in the following example situation:

  1. You create a model that uses types/properties from a specific technology extension (and which only exist in this specific technology extension) in the model itself, i.e. in the Scope set.
  2. You then set the Context of the model to an Application that does not use this specific technology extension
  3. When you attempt to publish the model, the metamodel check will discover that the types/properties that you have specified in the model do not exist in the Application's metamodel (because the extension is not installed) and the publication will fail.

Therefore you must ensure that you set the Context correctly before publication, particularly if you are using types/properties in the model from a specific technology extension:

A successful publication is displayed on the screen as follows:

The publication date is listed in the list of models:

Versioning

The first publication of the model as an extension will use the following version number:

1.0.0-funcrel

When you re-publish the model and Console determines that the model has changed, then the second digit will increment and a new extension will be created, for example:

1.1.0-funcrel

Step 3 - Use your model in an Application analysis

When your extension has been published, you can use it in any Application during the next analysis/snapshot that you run. To do so, click Console from the context switcher on the toolbar:

Click the relevant application:

≥ 2.10

Move to the Application - Config - Architecture section:

Then use the Add button to select the model (extension) you require:

Published models no longer appear in the Application - Extensions section, as was the case previously.

The model will then be listed with the status included. You must then either run a new analysis which will include a job step to install the new model, or you can manually run this job step:

The model is then marked as installed:

2.4 - 2.9

Move to the Application - Extensions section and click the Available tab:

You should see your extension listed - use the search box to filter the list of extensions if you cannot see it immediately. Then choose the appropriate version to use and click Include. The extension will be used in the next analysis/snapshot:

When an extension has been installed (i.e. an analysis/snapshot has been run), you will be able to see your rule as follows:

Architecture Checker model

Under the dedicated Technical Criterion for Architecture Models in the Assessment Model tab:

In the Architecture tab:

Quality Rule model

Under the chosen Technical Criterion in the Assessment Model tab:

Re-editing the model and re-publication

If you edit the model, make a change and then save the model, Console will detect that the model has been modified:

You can now publish the model again. As explained above a new extension/model will be generated with a new version number.

≥ 2.10

The new version of the model will be available for selection in the Application - Config - Architecture section. Click Add and choose the new version to replace the existing version that you have used:

A banner will then inform you that the Install Models action must be run in order for the Architecture Model to be taken into account. This action can be done manually or automatically as part of the next analysis (when it is run):

2.4 - 2.9

This extension will then be available for use at Application level - you will need to select the extension in Application - Extensions, click Include and run a new analysis/snapshot before the results can be viewed in the CAST Dashboards.