How to: Add an Embedding Relationship to a Domain-Specific Language Definition
To establish relationships among domain classes in a domain-specific language definition, you use domain relationships. You can establish two kinds of domain relationships between domain classes. One of them is called an embedding relationship, which you can create from the Toolbox in the Domain-Specific Language Designer. For more information about embedding relationships, seeand .
To add an embedding relationship to a domain-specific language definition
In the Toolbox, on the Dsl Designer tab, click the Embedding Relationship connector.
Drag the connector so that it appears between two established domain classes on the diagram. Or, you can click one class and then click the other class to connect them.
The pointer changes to a prohibitory sign if the connection points are not valid.
For more information, see.
The domain relationship is created in the domain-specific language definition under the Classes and Relationships swimlane. The relationship is defined with established roles that you can customize. The roles named DomainClass1 and ExampleMo… (ExampleModel) in the following illustration include multiplicities, which are shown as 0..* and 1..1. You can modify these multiplicities in the Properties window.
Domain Relationship with Roles
You can also add domain properties to a domain relationship. For more information, see.