M2M Checker Guide
Once the M2MRuleset has been implemented, it is recommended to launch the M2M Model Checker.
To launch the M2M Checker on all M2MRuleset of the project, click on Tools | Check Model | DefaultConfig:
"DefaultConfig" is the name of the component of the project. A project can contain several components with different names. To launch the M2M Checker on a specific M2MRuleset, select the M2MRuleset of your choice in the browser, and click on Tools | Check Model | Selected Elements
The check results are displayed in the tab "Check model" below:
To execute and display only the M2M Checks, you have to unselect all other Checks. To proceed, click on Tools | Check Model | Configure:
The "Configuration" window of the Component is displayed, and the "Checks" Tab selected. Deselect all checks, and then select only M2M Checks. Click on "OK", and relaunch Checker:
The M2M Model Checker runs these External Checks:
-
M2M Profile constraints
This Check verifies that all M2MRuleset elements have their profile constraints properties not violated. It will check the following properties:
- Model.Stereotype.Aggregates : it defines the new terms which are allowed to be contained by the element
- Model.Stereotype.AggregatesMultiplicities : it defines the multiplicity of the new terms which are allowed to be contained by the element
- Model.Stereotype.AllowedTypes : it defines the new terms which are allowed to type the element
- Model.Stereotype.Targets : it defines the new terms which are allowed to be targeted by the Dependency
- Model.Stereotype.Owners : it defines the new terms which are allowed to contain the element
It is executed on all elements Stereotyped by a M2M Profile Stereotype.
-
M2MRuleset Checks
This Check verifies if the pre-process and post-process functions which are selected have the correct signature.
- Checks if the postProcess and PreProcess functions have the correct signature
- Checks if the source profiles of the ruleset are all loaded.
- Checks if the target profiles of the ruleset are all loaded.
It is executed on all M2MRuleset elements.
-
MappingRule Checks
This Check verifies if the MappingRule source and target are valid and can be executed by the M2M Engine.
- Checks if the source Metaclass or Stereotype is present
- Checks if the target Metaclass or Stereotype is present
- Checks if the target Metalcass is present, and the target Stereotype is applicable to any Metaclass
- Checks if the source Stereotype is contained by the selected source Profiles
- Checks if the target Stereotype is contained by the selected target Profiles
It is executed on all MappingRule elements.
If additional checks must be added, it is possible to create some new ones in the ruleset. They will be added to Rhapsody model checker when the model is loaded.This chapter explains how to create custom model checker.