M2MExportRuleset inheritance modeling

M2MExportRuleset inheritance is supported to ease the reuse of ExportMappingRules. This inheritance relation is mono-directional. When a transformation is launched from a M2MExportRuleset which inherits from another M2MExportRuleset, the inherited ExportMappingRules are executed as well. It is also possible to disable or override a specific ExportMappingRule of the M2MExportRuleset parent.

To add an inheritance relation relation between two M2MExportRuleset, right-click on the M2MExportRuleset you want it inherits from another M2MExportRuleset, and click on Add new | M2MIE | inheritsFrom: add inheritsFrom

After clicking, a dialog window is displayed to select the M2MExportRuleset parent:

select inheritsFrom

Once the M2MExportRuleset parent is selected, it creates a the Dependency inheritsFrom which link a M2MExportRuleset to its parent.
Here is an example of how it looks:

inheritsFrom example

If a transformation is executed from the M2MExportRuleset SysML2Ar42, the M2M Engine will execute the ExportMappingRules of SysML2Ar42 and SysML2Ar3x. If a transformation is executed from the M2MExportRuleset SysML2Ar3x, the M2M Engine will execute the ExportMappingRule of SysML2Ar3x only.

This relation is used to link a M2MExportRuleset to a ExportMappingRule from a M2MExportRuleset parent. When the M2M Engine executes a transformation based on the M2MExportRuleset which is the source of the disableRule, it will skip the ExportMappingRule which is the target of the disableRule relation. In the example below, when SysML2Ar42 is executed, SysML2Ar3x rules will also be executed due to the inheritsFrom relation, but it will skip the ExportMappingRule SysML2Ar3x::mappingrule_2:

disableRule example

This relation is used to link a ExportMappingRule to a ExportMappingRule from a M2MExportRuleset parent. When the M2M Engine executes a transformation based on the M2MExportRuleset which is the owner of the overrideRule relation source, it will skip the ExportMappingRule which is the target of the overrideRule relation, and execute the source ExportMappingRule. In the example below, when SysML2Ar42 is executed, SysML2Ar3x rules will also be executed due to the inheritsFrom relation, but it will execute the ExportMappingRule SysML2Ar42::mappingrule_4 instead of SysML2Ar3x::mappingrule_2:

overrideRule example