On this page:

Summary: how to export a Quality Rule Model as a single rule to a brand new CAST AIP extension package.

Step 1 - Define the Model's properties

Before you can export the Quality Rule Model as an extension, you will need to define some properties for this model. To define the properties, see CAST Architecture Checker - Configuring model properties. At a minimum, the following is required:

ID

This unique ID is used to identify the resulting rule throughout the CAST Management Studio and the CAST dashboards (the ID will be saved to a table in the CAST Management Service schema):

Technical Criterion

The Technical Criterion is used to correctly position the resulting rule within the existing CAST AIP Assessment Model. At least one Technical Criterion must be selected:

Documentation

The Documentation tab and all fields should be filled in:

  • Rationale
  • Remediation
  • Reference
  • Sample
  • Remediation Sample
  • Scope
  • Output

The Description field in the General tab is also required:

If you attempt to export the model before these properties are defined, then an error will occur, for example:

You may also wish to define the target Technology for your rule, otherwise this message will be displayed when you attempt to export the model. This is not mandatory, however, if you do not define specific technologies, the rule will be triggered regardless of the technologies that are being analyzed, therefore impacting performance.

Step 2 - Start the export

To begin the export:

  • click the icon on the toolbar
  • or select the File > Export menu

The export dialog box will then be displayed:

Click to enlarge

Note that for the very first export all fields will be blank. Subsequent exports will re-use the same field details as the last export - these can be changed if required.

The details are stored in the following file:

%APPDATA%\CAST\Archi-Checker-QR\<version>\archichecker.properties

...using the following keys:

dataset.exportDirectory
dataset.exportName
dataset.exportVersion
dataset.exportAuthor
dataset.exportTitle
Field nameMandatoryDescription
Folder(tick)

Choose a destination folder for the extension package folders/files that will be generated by the export. Choosing a folder will force the creation of a new folder in the destination as follows:

com.castsoftware.ac.qr.<name>.<version>
Name(tick)

Enter a name for the extension. This name must can only contain alpha-numeric characters and no white space. This name will be used (among other uses) to name the folder created for the extension - for example choosing "test" will result in the following:

com.castsoftware.ac.qr.test.<version>
Title(tick)Enter a title - this will be used to identify the extension. More specifically the contents of this field will be used in the extension .nuspec file in the <title> element.
Author(tick)Enter an author - this will be used to identify who has created the extension. More specifically the contents of this field will be used in the extension .nuspec file in the <author> element.
Version(tick)

Enter a version number. The required format is as follows - [suffix] is not required:

major.minor.patch[suffix]
Rules-

The Rules section lists the rules that will be created, based on your model. When exporting a Quality Rule Model to a new extension, this section will only contain one rule that corresponds to corresponding Quality Rule Model.

IDUnique ID assigned to the model/rule - see CAST Architecture Checker - Configuring model properties.
NameName assigned to the model/rule - see CAST Architecture Checker - Configuring model properties.
Status

Status in the export:

  • NEW - has never been exported or is not present in the target folder
  • PUBLISHED - the rule is already present in the target folder
  • UPDATING - the rule is already present in the target folder and the new export will update it
RemoveA check box that enables you to remove the rule from the target extension.

To start the export, click the Export button:

On completion Windows Explorer will open at the location of the extension:

This extension is now ready to be installed.

Warnings when exporting

The export process will check whether any sets/layers defined in the model are present in the metamodel and if not will display a warning message to that effect:

The export process will be allowed to continue (in previous releases a "null error" was displayed and the export failed) and the log will contain information about the types that are not in the metamodel so that these can be corrected:

Note that this check functions in online and offline mode:

  • when in offline mode, the "metamodel" checked by CAST Architecture Checker is an "offline" metamodel stored on disk in %PROGRAMFILES%\CAST\Archi-Checker-QR\configuration\Languages
  • when in online mode, the "metamodel" checked by CAST Architecture Checker is the metamodel present in your selected Application.

Note also that when an error linked to the metamodel exists in the Model before export, the layer or set will be displayed in red: