Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Content layer
id1183704104
Content column
id1183704106
Content block
id1183704102

On this page

Table of Contents
maxLevel3
minLevel3

Content block
id1183704105

Prerequisites

  • The PureVariantsProfile.mdzip profile is used.
  • A feature model is defined in the pure::variants program.
  • A system model (a superset or 150% model) is defined in the modeling tool developed by No Magic Inc., e.g. MagicDraw.


Note
titleModeling 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
titleNote

This procedure is required when starting the project for the first time.

  1. In pure::variants, open the feature model. In the modeling tool, open the system model.
  2. In pure::variants, specify the feature project:
    1. In the Variant Project view, right-click your model folder and select New > Family Model.

      Creating new family model

    2. In the Family model name box, type the name of a family model and click Finish.
    3. Create a Component. In the Family Model Editor pane, right-click the created family model and select New >  Component.



    4. In the New Element dialog, type a Component name and click Finish.
    5. 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.
  3. In the modeling tool, set the pure::variants focus. Switch to the modeling tool. In the pure::variants window, click the Open a pure::variants Model button and browse through your file system to open the pure::variants configuration file.

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 Blocs.


To set variation points


  1. 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.
  2. Open the shortcut menu of the selected block, click Pure Variants and select a variation point to add.


    Variation point kindDescriptionValues to specify

    Existence

    Select it to control the existence of a model

    elementin variantmodels

    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.

    Expressionreturning

    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

    arequirement

    a requirement text.

    Name of the tag that is controlled by this variation point.

    Expressionreturning

    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.


  3. 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 condition-value pair, where each condition 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
    titleEditing 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.

  4. 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 realization


  1. In the pure::variants window, click the Enable Transformation Preview button to turn the preview on.
  2. Click  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 variant


  1. In the pure::variants window of the modeling tool, click  Select a Variant  and select a particular variant from the list.
  2. On the main menu, click Tools Model Transformation.
  3. The Model Transformation Wizard opens. In the wizard, select Variant Realization and click Next  to proceed to the following step.
  4. Select the transformation source - a Package where your system model is stored. 
  5. Click Finish, when you are done. Models not needed according to a selected variant configuration are removed from the model.


Note
titlepure::variants

Generating particular variants can be performed in pure::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::variantsprojectvariants project, e.g., requirements, documentation, and others.

Content block
id1183793580