Skip to main content
diagram

Entity Types

The RTM model defines entity types under the domainModelTypes root key. Each entity type maps to a Polarion work item type via polarionType.
PropertyTypeDefaultDescription
domainModelTypesobjectNoneRoot container defining all entity types in the domain model. Each key is an entity type name.
domainModelTypes[].namestringNoneUnique identifier for the entity type. Used in relationships and queries.
domainModelTypes[].polarionTypestringNoneMaps this entity to a Polarion work item type. If omitted, uses a generic work item type.
domainModelTypes[].propertiesarrayNoneList of properties available on this entity type. Each maps to a Polarion work item field.
domainModelTypes[].properties[].namestringNoneName of the property. Must correspond to a Polarion work item field (built-in or custom).

Standard RTM Entity Types

domainModelTypes:
  Document:
  Chapter:
  UserNeed:
    polarionType: userNeed
    properties:
      description:
      severity:
      component:
      type:
  SystemRequirement:
    polarionType: systemRequirement
    properties:
      description:
      severity:
      component:
      type:
  DesignRequirement:
    polarionType: designOutput
    properties:
      description:
      severity:
      component:
      type:
Document and Chapter are built-in entity types. Document represents Polarion LiveDoc modules. Chapter represents document headings (structure elements). Neither requires a polarionType mapping.

Relationships

Relationships define navigable links between entity types using Polarion link roles.
PropertyTypeDefaultDescription
relationshipsarray[]Defines all navigable relationships between entity types.
relationships[].fromstringNoneSource entity type. Must match a domainModelTypes key.
relationships[].tostringNoneTarget entity type. Must match a domainModelTypes key.
relationships[].cardinalitystringNoneRelationship multiplicity: one-to-many, many-to-one, many-to-many.
relationships[].storagestringNonePersistence mechanism. Use linkedWorkItems for Polarion work item links.
relationships[].linkRolestringNonePolarion link role ID. Must exist in project configuration.
relationships[].fromNavPropNamestringNoneNavigation property name on source entity to traverse to target.
relationships[].toNavPropNamestringNoneNavigation property name on target entity to traverse back to source.

Standard RTM Relationships

relationships:
  - from: UserNeed
    to: SystemRequirement
    cardinality: one-to-many
    storage: linkedWorkItems
    linkRole: relates_to
    fromNavPropName: systemRequirements
    toNavPropName: userNeeds

  - from: SystemRequirement
    to: DesignRequirement
    cardinality: one-to-many
    storage: linkedWorkItems
    linkRole: relates_to
    fromNavPropName: designRequirements
    toNavPropName: systemRequirements

Constraints

Entity types support three constraint types for scoping data loading and entity creation.
ConstraintDescription
loadQuery filter defining which entities to load. Filters by document properties.
createDefault values applied when creating new entities of this type.
pickPicker filter controlling which entities appear in selection dropdowns.
UserNeed:
  polarionType: userNeed
  properties:
    description:
    severity:
  constraints:
    pick:
      document:
        moduleFolder: Requirements
        type: requirementsDocument
    create:
      document:
        moduleFolder: Requirements
        moduleName: User Needs
Use $context.source.document.component in pick constraints to dynamically filter by the source entity’s component value. This ensures related entities are scoped to the same component.

Expansion Paths

In the sheet configuration, the RTM model supports multi-level expansion through navigation properties:
sources:
  - id: rtm
    title: RTM
    model: rtm
    query:
      from: UserNeed
    expand:
      - name: systemRequirements
        expand:
          - name: designRequirements
This loads UserNeed entities and expands two levels deep through SystemRequirement to DesignRequirement, enabling a full RTM hierarchy view in the sheet.

Complete YAML Example

domainModelTypes:
  Document:
  Chapter:
  UserNeed:
    polarionType: userNeed
    properties:
      description:
      severity:
      component:
      type:
    constraints:
      pick:
        document:
          moduleFolder: Requirements
          type: requirementsDocument
  SystemRequirement:
    polarionType: systemRequirement
    properties:
      description:
      severity:
      component:
      type:
    constraints:
      pick:
        document:
          type: requirementsDocument
  DesignRequirement:
    polarionType: designOutput
    properties:
      description:
      severity:
      component:
      type:
    constraints:
      pick:
        document:
          type: designDocument

relationships:
  - from: UserNeed
    to: SystemRequirement
    cardinality: one-to-many
    storage: linkedWorkItems
    linkRole: relates_to
    fromNavPropName: systemRequirements
    toNavPropName: userNeeds
  - from: SystemRequirement
    to: DesignRequirement
    cardinality: one-to-many
    storage: linkedWorkItems
    linkRole: relates_to
    fromNavPropName: designRequirements
    toNavPropName: systemRequirements

See Also

Code: rtm_model.yaml, model.yaml, constraints-base.yaml, powersheet.yaml
Source Code
  • powersheet.yaml
  • prod-powersheet-src/com.nextedy.powersheet.client/cypress/e2e/admin/admin.cy.ts
  • prod-powersheet-src/com.nextedy.powersheet.client/src/modules/ConfigProvider/types/UserPermissions.d.ts
  • prod-powersheet-src/com.nextedy.powersheet/src/META-INF/hivemodule.xml
  • prod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/models/constraints-base.yaml