How to create a relationship type
Create the relationship type
Section titled “Create the relationship type”- In the Explorer, expand your M2 metamodel package
- Right-click on the Relationship Types package
- Select New Relationship Type
- Rename it (e.g., “Manages”) and press Enter
Configure notation
Section titled “Configure notation”With the relationship type selected, set its visual appearance:
- Line style — solid, dashed, or dotted
- Source marker — none, arrow, or hollowArrow
- Target marker — none, arrow, or hollowArrow
- Colour — edge line colour
- Source-to-target verb — forward direction label (e.g., “manages”)
- Target-to-source verb — reverse direction label (e.g., “managed by”)
Add constraints
Section titled “Add constraints”Constraints control which element types this relationship can connect:
- In the Properties panel, find the Constraints section
- Add a valid pair: select a source element type and a target element type
- Repeat for additional valid combinations
Without constraints, the relationship can connect any two elements. With constraints, only the specified source/target pairs are allowed.
Add properties
Section titled “Add properties”Relationship types can have properties just like element types. See How to define properties and enumerations.
- Use solid lines for strong/structural relationships, dashed for dependencies, dotted for annotations
- Source-to-target and target-to-source verbs appear in the Context panel and make relationships human-readable
- Start with narrow constraints and widen later if needed — it’s easier to allow more than to restrict what’s already been used