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

Introduction

Each model that is used during a snapshot (whether an Architecture Model or a Quality Rule model) will be visible in the results as a distinct Quality Rule. A Quality Rule has various accompanying values/properties that determine how its results are viewed in the CAST dashboards. These values/properties should be configured for the rules that result from your models.

The properties differ depending on the type of model you are working on:

Architecture Model

  • ID, name, model type and short description to identify the rule
  • Documentation to help end users understand what the rule is checking for
  • Weight of the rule in the parent technical criterion
  • Whether the rule is critical or not

These properties should be populated as follows:

Model


Metric ID

A unique identifier for your model must be defined for all models. This ID is used to identify the Model throughout the CAST dashboards.

  • A positive and even number above 2,000,000 can be assigned as an ID (values less than this are already reserved for use by CAST). CAST recommends using CAST Extend to reserve a range of IDs for your use (if you have not done so already). To do so, sign in to CAST Extend and select ID Ranges > Quality Range Reservation > Reserve Rule ID Range:
    • The Extension ID field is of the form: com.castsoftware.uc.<free-form text>. Where <free-form text> can be any string that describes your initiative or your project.
    • For the Range amount field, choose a number between 1 and 10. 1 corresponds to a range of 1000 IDs, therefore if you enter 3, you will be granted 3000 IDs.
    • After you have clicked on Reserve, a range of rule IDs are defined and ready for your use.
    • See Managing ID ranges for custom extensions for more information about this.
  • The increment buttons will increment the entered ID by + or - 2.
  • The ID must be unique. If two models with the same ID are associated to an Application, only the first model will be used and the second will be ignored.
  • If the ID is set to 0 (default) or blank, then the model (and resulting rule) will be ignored when the snapshot is generated.

Model ID validation

The Model's ID will be validated whenever the model is edited. Therefore, any errors in the ID (such as using an odd number) will be immediately flagged in the GUI:

Updating the Model ID

The Model's ID can be changed directly in the Architecture Studio interface (in v. ≥ 1.18) - previously this was not possible at all. Note that you must ensure that the new ID you choose is not already being used by another Application since this is not validated by Architecture Studio:

Model typeIndicates the type of model that was chosen when the model was created (authorized or forbidden). This cannot be modified.
NameThe name of the corresponding rule as it will appear in the CAST dashboards
Description

A description of the model/rule (not displayed in the CAST dashboards). This description is displayed in the main list of models when rolling your mouse pointer over the model name (see AIP Console - Architecture Studio - Existing Models:

Documentation

Documentation fields for the rule resulting from the model:

  • Rationale: Reason why the violation pattern is a risk.
  • Remediation: How to remove the violation pattern.
  • Reference: Source reference of this violation pattern.
  • Sample: Sample of source code showing the violation pattern.
  • Remediation sample: Sample of source code showing the proposed remediation.
  • Output: Description of available information for the violations.
  • Scope: Description of the scope of tested objects.
Assessment ModelWeight

This option enables you to change the Weight applied to the corresponding rule. This value defines how "important" the rule is in the parent Technical Criterion "Architecture Models Automated Checks". You can select a value between 0 and 9 (both included); a value equal to 0 has the same effect as ignoring the corresponding rule; the default value is 1.

Consider the rule as critical when computing the gradeThis option enables you to choose whether the corresponding rule is set as critical or not, i.e. it allows you to threshold the grade of the parent metric using the grade of the child metric. The default value is "not Critical".

Quality Rule model

Model


Metric IDSee table above.
Model typeIndicates that the model is a QualityRule model. This cannot be modified.
NameThe name of the corresponding rule as it will appear in the CAST dashboards and the name of the extension when published.
Description

See table above.

Documentation

See table above.

Technical Criteria

This section governs which Technical Criteria your new rule will contribute to. You can choose any existing Technical Criteria in the current Assessment Model and then define how the rule contributes:

  • Weight: This option enables you to change the Weight applied to the corresponding rule. This value defines how "important" the rule is in the chosen parent Technical Criterion. You can select a value between 0 and 9 (both included); a value equal to 0 has the same effect as ignoring the corresponding rule; the default value is 1.
  • Critical: This option enables you to choose whether the corresponding rule is set as critical or not, i.e. it allows you to threshold the grade of the parent metric using the grade of the child metric. The default value is "not Critical".

Technologies

This option allows you to select a target Technology for your rule. This choice dictates when the rule is triggered during an analysis:

  • if you select a technology or technologies, the rule will only be triggered when the selected technologies are present in the source code.
  • if you do not select specific technologies, the rule will be triggered regardless of the technologies that are being analyzed, therefore impacting performance.
Grade Thresholds

This option allows you to set specific Grade thresholds (grades are visible in the Health Dashboard) to generate compliance percentages for the corresponding rule:

The thresholds should be descending (from grade 4 to 1) - errors will be displayed if these configurations are attempted:

  • No labels