The The PureVariantsProfile.mdzip profile is is used.
A feature model is defined in the pure::variants programvariants program.
A system model (a superset or 150% model) is defined in the modeling tool developed by No Magic Inc., e.g. MagicDraw.
Note
title
Modeling tool
MagicDraw as a modeling tool is used in descriptions as an example.
Connecting feature and system models
To connect feature and system models
Note
title
Note
This procedure is required when starting the project for the first time.
In pure::variants, open the feature model. In the modeling tool, open the system model.
In pure::variants, specify the feature project:
In the Variant Project view, right-click your model folder and select New > Family Model.
In the Family model name box, type the name of a family model and click Finish.
Create a Component. In the Family Model Editor pane, right-click the created family model and select New > Component.
In the New Element dialog, type a Component name and click Finish.
Create a MagicDraw project: - If a system model is local, in the Family Model Editor pane, right-click the created Component and select New > MagicDraw Project. In the open dialog, specify the .mdzip file of your system model as the file value. Click Finish when you are done. - If a system model is in a server, TBD.
In the modeling tool, set the pure::variants focusvariants focus. Switch to the modeling tool. In the the pure::variants window, click theOpen Open a pure::variants Model button variants Model button and browse through your file system to open the pure::variants configuration variants configuration file. Image Modified
Specifying the variation points in the system model
In the system model (in a modeling tool), you must specify variation points and define how the feature choices impact the variation point. Variation points can be set on on Blocs.
To set variation pointsvariation points
In the In the Block Definition Diagram(BDD), select a Block (either an element in the Model Browser or a symbol on a diagram pane) for a variation point.
Open the shortcut menu of the selected block, click Pure Variants and select a variation point to add.
Variation point kind
Description
Values to specify
Existence
Select it to control the existence of a model element in variant models. The element can either exist or be removed in a particular variant model depending on a variation condition.
Expression (boolean)
Primitive Property
Select it to set the values of UML model element properties that accept strings, numbers, booleans as values. Typical examples are default value (numeric), multiplicity (numeric), documentation(string), name (string).
Name of the property that is controlled by this variation point.
Expression returning the value for that property.
Primitive Tag
Select it to set the values of model element properties that accept strings, numbers, booleans as values, in cases when a property is not a standard UML property but defined as a tag in an extension profile. A typical example is a requirement text.
Name of the tag that is controlled by this variation point.
Expression returning the value for that tag.
Element Property
Select it to control the values of those UML model element properties that accept other UML elements as values. A typical example would be a property type, property default value for enumeration-type properties.
Name of the property that is controlled by this variation point.
Element Value Specification with a table of pairs: condition-value, where each condition is a boolean expression.
Element Tag
Select it to control the values of tags that accept other UML elements as values in cases when a property is not a standard UML property but defined as a tag in an extension profile.
Name of the tag that is controlled by this variation point.
Element Value Specification with a table of pairs: condition-value, where each condition is a boolean expression.
The Edit Expression dialog opens, where you can add an expression to filter a model according to selected features. If you select Element Property or Element Tag as a variation point, the variation point Specification window opens. In the property group list, select the Element Value Specification property and click the Create button to add a conditiona condition-value pair, where each condition is a boolean expression and a value is a boolean expression and a value is an element. Create as many pairs as are needed. Click the Edit button to open the Edit Expression dialog.
Tip
title
Editing an expression
You can edit the expression in the element with a variation point assigned Specification window. The expression is stored as a property in the Constraints property group.
Repeat steps #1 to #3 for all Blocks you want to assign as variation points in your model. Model elements assigned as variation points are marked with a blue variation sign in the Model Browser, as well as their symbols (shapes and paths) on a diagram pane.
Notation of a Block having a variation point assigned.
Generating of a particular product variant
After you assign variation points, you can generate a particular product variant.
To preview a particular product variant realizationvariant realization
In the In the pure::variantswindow window, click the Enable Transformation Preview button to turn the preview on.
Click Select a Variant and select a Variant and select a particular variant from the list. In the model:
Items that are not included in a selected variant appear in red.
Items depending on the result of a defined expression appear in yellow, meaning the result depends on a property that could be set for an element according to the expression.
Elements in red are not added to the selected model variant. Elements in yellow change according to the defined expression.
To generate a particular product variantproduct variant
In the In the pure::variants window of the modeling tool, click Select a Variant and select Select a Variant and select a particular variant from the list.
The Model Transformation Wizardopens opens. In the wizard, select Variant Realization and click Next to proceed to proceed to the following step.
Select the transformation source - a Package where your system model is stored.
Click Finish, when you are done. Models not needed according to a selected variant configuration are removed from the model.
Note
title
pure::variants
Generating particular variants can be performed in pure::variants as variantsas well. In this case, you can cut elements not just of the system model in MagicDraw, but of all artifacts connected to the pure::variants project, e.g., requirements, documentation, and others.