Creating Your First Metamodel
In this tutorial, you’ll build a custom metamodel — a “Farquind Org Map” — that defines element types for mapping people, teams, and systems at Farquind Yachts. By the end, you’ll have a working M2 with element types, relationship types, notation, and constraints, tested against real Farquind content.
Prerequisites: You’ve completed the core modelling tutorials (2.1–2.6) and are comfortable with the Explorer, Canvas, Palette, and Properties panel.
What you’ll build: An M2 metamodel with three element types (Person, Team, System), two relationship types (Belongs To, Manages), and a test M1 model mapping Farquind’s organisation.
What is a Metamodel?
Section titled “What is a Metamodel?”A metamodel defines the building blocks available for modelling. Think of it as a language:
- Element types define the kinds of things you can model (Person, Team, System)
- Relationship types define how those things can connect (Belongs To, Manages)
- Constraints control which connections are valid (a Person belongs to a Team, not the other way around)
- Notation controls how each type looks on diagrams (shape, colour, icon)
Your metamodel lives at the M2 layer. Users create M1 instances of your types when they build models. For more on this, see Understanding the Four Layers.
1. Create the Metamodel Package
Section titled “1. Create the Metamodel Package”- In the Explorer, right-click on the root of the tree
- Select New Metamodel…
- Enter the name Farquind Org Map
- Click Create
This creates the standard M2 package structure:
Farquind Org Map/├── Element Types/├── Relationship Types/├── Enumerations/└── Views/ ├── Diagrams/ ├── Catalogs/ └── Matrices/2. Organise Element Types into Layers
Section titled “2. Organise Element Types into Layers”Layer sub-packages group related element types. Our org map has two natural groupings.
- Right-click on Element Types and select New Package
- Name it People & Teams
- Create another package named Technology
Farquind Org Map/├── Element Types/│ ├── People & Teams/│ └── Technology/├── Relationship Types/├── Enumerations/└── Views/3. Create Element Types
Section titled “3. Create Element Types”Person
Section titled “Person”- Right-click on People & Teams and select New Element Type
- Rename it to Person
- In the Properties panel, configure the notation:
- Shape: rounded
- Colour: #81D4FA (light blue)
- Icon: use the
usericon from Lucide — copy the SVG markup and paste it into the Icon field
- Right-click on People & Teams > New Element Type
- Rename it to Team
- Configure notation:
- Shape: rectangle
- Colour: #A5D6A7 (light green)
- Icon: use the
usersicon from Lucide
System
Section titled “System”- Right-click on Technology > New Element Type
- Rename it to System
- Configure notation:
- Shape: rectangle
- Colour: #CE93D8 (light purple)
- Icon: use the
monitoricon from Lucide
Your element types now look like this:
Element Types/├── People & Teams/│ ├── Person (rounded, blue, user icon)│ └── Team (rectangle, green, users icon)└── Technology/ └── System (rectangle, purple, monitor icon)4. Create Relationship Types
Section titled “4. Create Relationship Types”Belongs To
Section titled “Belongs To”This connects a Person to the Team they work in.
- Right-click on Relationship Types > New Relationship Type
- Rename it to Belongs To
- Configure notation:
- Line style: solid
- Target marker: arrow
- Colour: #DDDDDD
- Source-to-target verb: belongs to
- Target-to-source verb: has member
Manages
Section titled “Manages”This connects a Person to the System they are responsible for.
- Right-click on Relationship Types > New Relationship Type
- Rename it to Manages
- Configure notation:
- Line style: dashed
- Target marker: arrow
- Colour: #DDDDDD
- Source-to-target verb: manages
- Target-to-source verb: managed by
5. Add Constraints
Section titled “5. Add Constraints”Without constraints, any element can connect to any other. Let’s restrict the relationships to valid combinations.
Belongs To — Person to Team only
Section titled “Belongs To — Person to Team only”- Select the Belongs To relationship type
- In the Properties panel, find the Constraints section
- Add a valid pair: Source: Person, Target: Team
Manages — Person to System only
Section titled “Manages — Person to System only”- Select the Manages relationship type
- Add a valid pair: Source: Person, Target: System
Now users can only draw Belongs To from a Person to a Team, and Manages from a Person to a System. Any other combination is prevented.
6. Test Your Metamodel
Section titled “6. Test Your Metamodel”Create a model package
Section titled “Create a model package”- Right-click on the project root > New Root Package
- Name it M1 Farquind Organisation
- Select the package, and in the Properties panel, add an import for Farquind Org Map
The Palette now shows your custom element types.
Create a diagram and populate it
Section titled “Create a diagram and populate it”-
Right-click on M1 Farquind Organisation > New Diagram
-
Name it Executive & Systems
-
From the Palette, drag elements to create:
- Chase Martin (Person) — CEO
- Theo Gibson (Person) — CTO
- Maya Hawn (Person) — VP Engineering
- Software & Digital (Team)
- Engineering (Team)
- FQ Vessels (System)
- FQ Manufacturing (System)
-
Draw relationships:
- Chase Martin → Software & Digital (try to draw Belongs To — this won’t be allowed because Chase doesn’t belong to this team. Try connecting Theo Gibson instead — Belongs To works from Person to Team)
- Theo Gibson Belongs To Software & Digital
- Maya Hawn Belongs To Engineering
- Theo Gibson Manages FQ Vessels
- Maya Hawn Manages FQ Manufacturing
-
Save with Ctrl+S / Cmd+S
Your metamodel is working. The constraints prevented invalid connections, the notation makes each type visually distinct, and the Farquind org structure is starting to take shape.
What You’ve Learned
Section titled “What You’ve Learned”- How to create an M2 metamodel package with the standard structure
- How to organise element types into layers
- How to define element types with shape, colour, and icon notation
- How to define relationship types with line styles, markers, and verbs
- How to add pair-wise constraints to restrict valid connections
- How to test the metamodel by creating an M1 model and diagram
Next Steps
Section titled “Next Steps”- Adding Properties to Your Metamodel — Add typed properties (Title, Department, System Status) and enumerations to your element types
- Advanced Metamodel Features — Generalization, owned elements, compartments, display templates, and multiplicities