What is a Feature Model?
The Feature Model is a simple UML Class model. The root of the Feature Model is a Class with the «RootFeatureGroup» stereotype applied.
Guidelines for defining a Feature Model
Each Yes/No feature (a feature that can be chosen or not) is modeled as a UML property with Boolean assigned as a type.
Features with the assigned Boolean type
Each feature that has multiple alternative choices is modeled as a UML property with Enumeration assigned as a type. The alternatives are modeled as Enumeration literals.
A feature containing multiple alternative choices with the assigned Enumeration type
Alternative choices modeled as Enumeration literals
All UML properties defined as features have the «Feature» stereotype applied.
Feature with the applied stereotype
To create a new feature
- Right-click a RootFeatureGroup or FeatureGroup in Containment tree.
- Click Create Element > Feature.
The composing properties must have the «Feature» stereotype applied as well. There can be multiple grouping levels (see the image below). Hereby, features are organized into a feature tree (starting from Root Feature Group).
Features can be placed either into a Root Feature Group (Class) (with the «RootFeatureGroup» stereotype applied) directly or a subgroup. A subgroup is modeled as a FeatureGroup (Class) with the «FeatureGroup» stereotype applied and then it is connected to the Root Feature Group using the Composition relationship.
To create a RootFeatureGroup/Feature Group element from the diagram palette
- In the diagram palette, under Class Diagram, select RootFeatureGroup (or FeatureGroup).
- Click on the diagram pane to create it.