Skip to content
🤷

Forgive us! These docs are a work in progress. Some pages may be incomplete or describe features that aren't quite finished yet. Farkitect is in early development and we don't recommend using it for real work just yet. Feel free to explore — just be aware that things are still being built.

How to define owned element types

Owned elements (subordinates) are elements that live inside a parent element and render in a compartment on diagrams — like attributes inside an entity.

  1. In your M2 metamodel’s element type layer, create a new element type (e.g., “Attribute”)
  2. Add properties to it (e.g., “Data Type” as an enumeration, “Is Required” as Boolean)
  3. Configure basic notation (colour, icon)

2. Configure the parent to accept owned elements

Section titled “2. Configure the parent to accept owned elements”
  1. Select the parent element type (e.g., “Entity”)
  2. In the Properties panel, find the Notation > Subordinate Types section
  3. Add a subordinate type entry:
    • ID — a unique identifier (e.g., “attributes”)
    • Label — display name (e.g., “Attributes”)
    • Classifier — the owned element type (e.g., “Attribute”)
    • Display template — how each owned element renders (e.g., {name} : {Data Type})

Still on the parent element type’s notation, add a compartment:

  1. Add a new compartment entry
  2. Set content type to subordinates
  3. Set subordinate type ID to the ID you defined above
  4. Set label and show label as desired
  1. Select an M1 instance of the parent type
  2. Right-click > New Owned Element (or similar)
  3. Choose the subordinate type
  4. Name the element and fill in its properties

The owned element appears inside the parent’s compartment on diagrams.

TemplateExample output
{name}email
{name} : {Data Type}email : String
{name}{Is Required? [*]:}email* (if required) or email (if not)