pure::variants connector for enterprise architect manual

30
1 pure::variants Connector for Enterprise Architect Manual pure-systems GmbH Version 5.0.10.685 for pure::variants 5.0 Copyright © 2003-2022 pure-systems GmbH 2022 Table of Contents 1. Introduction .............................................................................................................................. 1 1.1. What is pure::variants Connector for Enterprise Architect? ..................................................... 1 1.2. Software Requirements .................................................................................................... 2 1.3. Installation ..................................................................................................................... 2 1.4. About this manual .......................................................................................................... 3 2. Using pure::variants Connector for Enterprise Architect ................................................................... 3 2.1. Starting pure::variants ...................................................................................................... 3 2.2. How pure::variants Connector for Enterprise Architect Works ................................................. 3 2.3. Preparing the Enterprise Architect Project ........................................................................... 3 2.4. Adding Variability to Enterprise Architect Projects ............................................................... 4 2.5. Creating a pure::variants Project for Enterprise Architect using the New Project Wizard .............. 22 2.6. Adding an Enterprise Architect Transformation to pure::variants Projects for Enterprise Archi- tect ................................................................................................................................... 23 2.7. Adding Enterprise Architect Projects to pure::variants Family Models ..................................... 25 2.8. Working with Enterprise Architect Database Projects ........................................................... 27 2.9. Working with Security-Enabled Enterprise Architect Projects ................................................ 28 2.10. Using the Enterprise Architect Project Variants ................................................................. 29 1. Introduction 1.1. What is pure::variants Connector for Enterprise Architect? pure::variants Connector for Enterprise Architect enables use of product line variability concepts in Sparx Systems Enterprise Architect models. It allows to maintain one master project from which different project variants are created automatically by selecting features from Feature Models in pure::variants. So instead of having to merge changes in slight variations of the base UML models, the change is applied once to the master project and then all relevant variants are automatically generated by pure::variants. Figure 1, “Overview of family-based software development with pure::variants” shows the four cornerstone ac- tivities of software product line development and the models used in pure::variants as the basis for these activities. When building the infrastructure for your Product Line, the problem domain is represented using hierarchical Feature Models. The solution domain, i.e. the concrete design and implementation of the software family, is im- plemented as UML Family Models. The two model types used for Application Engineering, i.e. the creation of product variants, are complementary to the models described above. The Variant Description Model (VDM), containing the selected feature set and associated values, represents a single problem from the problem domain. The Variant Result Model describes a single concrete solution drawn from the solution family.

Upload: others

Post on 15-May-2022

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: pure::variants Connector for Enterprise Architect Manual

1

pure::variants Connector forEnterprise Architect Manual

pure-systems GmbHVersion 5.0.10.685 for pure::variants 5.0

Copyright © 2003-2022 pure-systems GmbH

2022

Table of Contents1. Introduction .............................................................................................................................. 1

1.1. What is pure::variants Connector for Enterprise Architect? ..................................................... 11.2. Software Requirements .................................................................................................... 21.3. Installation ..................................................................................................................... 21.4. About this manual .......................................................................................................... 3

2. Using pure::variants Connector for Enterprise Architect ................................................................... 32.1. Starting pure::variants ...................................................................................................... 32.2. How pure::variants Connector for Enterprise Architect Works ................................................. 32.3. Preparing the Enterprise Architect Project ........................................................................... 32.4. Adding Variability to Enterprise Architect Projects ............................................................... 42.5. Creating a pure::variants Project for Enterprise Architect using the New Project Wizard .............. 222.6. Adding an Enterprise Architect Transformation to pure::variants Projects for Enterprise Archi-tect ................................................................................................................................... 232.7. Adding Enterprise Architect Projects to pure::variants Family Models ..................................... 252.8. Working with Enterprise Architect Database Projects ........................................................... 272.9. Working with Security-Enabled Enterprise Architect Projects ................................................ 282.10. Using the Enterprise Architect Project Variants ................................................................. 29

1. Introduction

1.1. What is pure::variants Connector for Enterprise Architect?

pure::variants Connector for Enterprise Architect enables use of product line variability concepts in Sparx SystemsEnterprise Architect models. It allows to maintain one master project from which different project variants arecreated automatically by selecting features from Feature Models in pure::variants. So instead of having to mergechanges in slight variations of the base UML models, the change is applied once to the master project and then allrelevant variants are automatically generated by pure::variants.

Figure 1, “Overview of family-based software development with pure::variants” shows the four cornerstone ac-tivities of software product line development and the models used in pure::variants as the basis for these activities.

When building the infrastructure for your Product Line, the problem domain is represented using hierarchicalFeature Models. The solution domain, i.e. the concrete design and implementation of the software family, is im-plemented as UML Family Models.

The two model types used for Application Engineering, i.e. the creation of product variants, are complementaryto the models described above. The Variant Description Model (VDM), containing the selected feature set andassociated values, represents a single problem from the problem domain. The Variant Result Model describes asingle concrete solution drawn from the solution family.

Page 2: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

2

Figure 1. Overview of family-based software development with pure::variants

pure::variants manages the knowledge captured in these models and provides tool support for co-operation betweenthe different roles within a family-based software development process:

• The domain analyst uses the pure::variants Feature Model editor and UML/SysML models in Enterprise Ar-chitect to build and maintain the problem domain model containing the commonalities and variabilities in thegiven domain.

• The domain designer uses UML models to describe the variable family architecture and to connect it via ap-propriate rules to the Feature Models.

• The application analyst uses a Variant Description Model to explore the problem domain and to express theproblems to be solved in terms of selected features and additional configuration information. This informationis used to derive a Variant Result Model from the UML model(s) in Enterprise Architect.

• The application developer generates a member of the solution (feature selections and variant specific EnterpriseArchitect Models) from the Variant Result Model by using the transformation engine.

1.2. Software Requirements

The following software has to be present on the user's machine in order to support the pure::variants Connectorfor Enterprise Architect:

Enterprise Architect: Enterprise Architect 9 - 15.2 is required. Compatibility with other EnterpriseArchitect releases is not guaranteed.

Note

Visualizations (see the section called “Visualizing Variability Infor-mation”) are not supported in Enterprise Architect 10, due to a bug inthis Enterprise Architect version.

The pure::variants Connector for Enterprise Architect is an extension for pure::variants and is available on allsupported Windows platforms.

1.3. Installation

Please consult section pure::variants Connectors in the pure::variants Setup Guide for detailed informa-tion on how to install the connector (menu Help -> Help Contents and then pure::variants Setup Guide ->pure::variants Connectors).

To enable the pure::variants Integration for Enterprise Architect please consult section pure::variants Integra-tions in the pure::variants Setup Guide for detailed information on how to install the connector (menu Help ->Help Contents and then pure::variants Setup Guide -> pure::variants Integrations).

Page 3: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

3

Now the Integration should be available in Enterprise Architect. Select Extensions->Add-In Windows to openthe Add-In window, which shows the pure::variants Integration user interface. Furthermore, you can enable ordisable the Integration at Extensions -> Manage Add-Ins... (Since Enterprise Architect 14, you can find bothentries in tab Specialize).

1.4. About this manual

The reader is expected to have basic knowledge about and experiences with pure::variants. The pure::variantsmanual is available in online help as well as in printable PDF format here .

2. Using pure::variants Connector for Enterprise Architect

2.1. Starting pure::variants

Depending on the installation method used either start the pure::variants-enabled Eclipse or under Windows selectthe pure::variants item from the program menu.

If the Variant Management perspective is not already activated, do so by selecting it from Open Perspective-> Other... in the Window menu.

2.2. How pure::variants Connector for Enterprise Architect Works

Before the Enterprise Architect project is extended with variability information a corresponding feature modelproject should be set up in the pure::variants Connector for Enterprise Architect. In this pure::variants project thefeatures to control variability in the Enterprise Architect projects are maintained. To add variability informationto UML models, the concept of UML constraints is being used. Special constraints are used to mark up optionalelements and connections in an UML model such as classes, states, transition, class attributes and class members.To identify these constraints a stereotype (<<pvRestriction>>) is used.

The constraint language is pvSCL (pure::variants Simple Constraint Language, see pure::variants User's Guide),which provides simple and intuitive syntax for expressing feature model conditions. For instance, to make a classoptional and include it only when the feature WindSpeed is not selected in pure::variants, the corresponding pvSCLrule is simply naming the feature inside the not operator: not(WindSpeed). To create variants of the master EnterpriseArchitect project, Variant Description Models (VDMs) have to be created in the pure::variants Connector forEnterprise Architect project. Each VDM contains the feature selection for one project variant. The transformationof a project variant will create an Enterprise Architect project variant in a specified output location. All optionalelements with failing constraint have been removed from this project variant.

2.3. Preparing the Enterprise Architect Project

Adding new Constraint Type

A new constraint type with the name "pvRestriction" has to be created. To create it, select General Types...in the Settings menu (or in Enterprise Architect 12 or later in Project > Settings > Project Types > GeneralTypes...). Select the Constraint tab in the dialog, enter the string "pvRestriction" in the Constraint field, an arbi-trary comment in the Description field (see Figure 2, “Adding pvRestriction type to Enterprise Architect GeneralTypes”). Filling the Description field is mandatory, then press Save.

Page 4: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

4

Figure 2. Adding pvRestriction type to Enterprise Architect General Types

Note

If the General Types... menu entry is missing, Enterprise Architect may need to be configured to show themenu entry. To do that, open the dialog Workspaces and Commands (either via View->Workspacesand Commands, or via View -> Perspectives...). On the second tab of the dialog that opens, you canconfigure which menus are shown.

Adding new Requirements Type

If you are using EA 12.x or older, follow the intructions below, otherwise you can skip them, since only theconstraint type is needed for EA 13 and newer:

A similar procedure has to be done for the requirements types. Select in the same dialog as before the Require-ments tab, add "p::v" as requirements name, add some text to the Description field and press Save. The newrequirements type will be listed in the lower part of the dialog. Now close the dialog.

To avoid repeating this process for each project, the changes to constraint and requirement types can be savedfrom Enterprise Architect to a XML file using Project > Data Management > Export Reference Data. In thedialog select "Constraint Types" and "Requirements Types". In a new project, simply import the saved file usingProject > Data Management > Import Reference Data. In newer EA versions, you can find the menu ExportReference Data easily by pressing the EA icon in the top left corner and then using the search box in the bottom.

2.4. Adding Variability to Enterprise Architect Projects

Adding variability to Enterprise Architect projects can be done either manually or by using the pure::variantsIntegration for Enterprise Architect.

Manually Adding Variability

Using the element properties dialog

Some Enterprise Architect model elements, such as classes or states, provide a Constraint tab in their propertiesdialog. To add a pvRestriction constraint, select the Constraint tab, select "pvRestriction" as type and enter the

Page 5: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

5

constraint in pvSCL syntax (see pure::variants User's Guide for details). The state (e.g. "approved" or "proposed")of the constraint is ignored by the pure::variants connector for Enterprise Architect.

Figure 3. Adding pvRestriction as Constraint dialog

If the constraint shall be visible in the diagram, select Features & Properties > Feature and CompartmentVisibility... in the context menu (keyboard short cut CTRL-SHIFT-Y) and check Constraints.

Figure 4. Showing Constraint Compartment

Page 6: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

6

Using a linked Constraint element

To add a linked constraint element, you can either use an element's or connector's context menu Attach Note orConstraint …. Or if that is not available, you can add a new Constraint element from the Common section of thetoolbox. The resulting element can then be linked to the element on which the pvRestriction should apply. Thelink should be of type NoteLink. To convert this constraint to a pure::variants constraint, use its context menuSpecialize > pure::variants > Convert to p::v constraint or use its properties dialog to set the stereotype topvRestriction. The figures below show the dialog and highlighted in yellow the resulting constraint element inthe model.

Figure 5. Adding pvRestriction as Constraint element

Figure 6. Resulting model diagram for a restricted transition

Using Preconditions

For Enterprise Architect operations a different approach is necessary. Since operations cannot be constrained,a pre-condition requirement is used to express pvRestrictions. The operations dialog has to be opened and thePre tab must be selected. Select "pvRestriction" (or "p::v" if you are using EA 12.x or older) as type andenter the pvSCL rule as Pre-condition. Press Save. It is recommended to add a stereotype to restricted operations.This simplifies localization of variable elements in the models, since preconditions are not easily visible. The

Page 7: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

7

actual name of the stereotype is not relevant, since the stereotype is not used by pure::variants. The recommendedstereotype label is <<optional>>.

Figure 7. Adding pvRestriction as Precondition

Note

Please note that only one pvRestriction constraint is allowed per element. If an element with multiplepvRestriction constraints is transformed, the transformation is aborted.

Using the pure::variants Integration for Enterprise Architect

To support users of the pure::variants Connector for Enterprise Architect, the Integration provides an editor forvariability information (see the section called “Adding and Editing Variability Information”) and visualizations topreview variants and find errors in variability information (see the section called “Visualizing Variability Infor-mation”). The instructions for installing the Integration can be found in Section 1.3, “Installation”.

First Use

To open the Integration window, first open an EA project, and then select Extensions -> Add-In Windows (sinceEnterprise Architect 14: Specialize -> Add-In Windows). Now the Integration window as shown in Figure 8,“pure::variants Integration Window” should be visible.

Page 8: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

8

Figure 8. pure::variants Integration Window

When you first use the Integration after installation, it is necessary to check whether the license preferences are

correct. To this end, open the Integration preferences dialog via the button in the Integration window or byselecting pure::variants->Preferences from the Extensions menu (or the Specialize tab, since Enterprise Archi-tect 14).

A dialog opens that shows the path to your pure::variants installation and your license information (see Fig-ure 9, “Preferences Dialog”). If any of the information is missing, you need to enter it. Use the ... button in thepure::variants Installation group to enter the installation directory, and the Install License button to specifyyour license.

If you are using a floating license and the URL in the Floating License Server group is not set already, youneed to enter the URL. To test if the connection to the floating license server is established, press the button TestConnection.

Now you can use the Integration.

Page 9: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

9

Figure 9. Preferences Dialog

Connecting with pure::variants Models

For editing variability information and viewing visualizations, it is necessary to connect your Enterprise Architectproject with one or more pure::variants models. The following types of pure::variants models can be loaded:

• Recommended: pure::variants configuration spaces, which enable selection of contained variant descriptionmodels (.vdm)

• pure::variants variant result models (.vrm)

• pure::variants feature models (.xfm)

• pure::variants family models (.ccfm)

pure::variants models can be opened from two different sources: Either from a pure::variants/Eclipse workspaceor from a pure::variants model server.

Opening models from a workspace

To open a model or configuration space, press on the Integration window. This will open a wizard, which firstallows choosing the source (workspace or server). Choose workspace and then browse to find your pure::variantsworkspace folder. Already known workspaces are listed in the workspace dropdown box. If you later need to add or

remove a workspace from the list, you can go to tab User Settings of the Integration preferences (accessible via ).

Page 10: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

10

Figure 10. Mode selection page

On the next page, all projects are listed that are located in the selected workspace folder or that are linked intothe pure::variants/Eclipse workspace.

Figure 11. Project selection page

Select one and on the next page choose the model(s) or configuration space you want to open.

Checkbox Store the selected pure::variants model location(s) in the current EA project allows you to save theselected model locations in the current EA project, so that these models will be opened again once any user opensthis EA project. If you do not select the checkbox, the model locations will only be stored on your computer. Fordetails, see the section called “Saving and Loading pure::variants Models”.

Page 11: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

11

Figure 12. Model selection page

Opening models from a model server

To open a model or configuration space directly from a pure::variants model server, also press . On the firstpage of the wizard, choose server and add the server address via button Add Server. Like in pure::variants, newservers need a name and the server address (e.g., https://yourserveraddress:443). Any known servers are listed inthe server dropdown box. If you later need to add or remove a server from the list, open the Integration preferences

by pressing . On tab User Settings, you can add or remove servers.

Figure 13. Mode selection page

On the next page of the wizard, all projects of the server that the current user has read access to are listed.

Page 12: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

12

Figure 14. Project selection page

Select one and on the next page choose the project's revision (branch or tag) from which you want to load a model.

Figure 15. Project selection page

Finally, on the last page select the model(s) or configuration space you want to open.

Checkbox Store the selected pure::variants model location(s) in the current EA project allows you to save theselected model locations in the current EA project, so that these models will be opened again once any user opensthis EA project. If you do not select the checkbox, the model locations will only be stored on your computer. Fordetails, see the section called “Saving and Loading pure::variants Models”.

Page 13: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

13

Figure 16. Model selection page

Opening pure::variants Configuration Spaces

To open a pure::variants configuration space, use the wizard as described above. On the last page, select a config-uration space folder. Now the Integration window should show all used models of your configuration space. Pleasenote that family models (.ccfm) are not opened per default. You can enable loading family models in the Integra-tion preferences on the Visualization tab. After selecting a variant from the dropdown list, selections should beshown in front of features. To ease usage of configuration spaces with many variants, the latest opened variantsare shown at the top of the list.

Figure 17. Configuration Space with Selected Variant

Opening Other pure::variants Models

Other pure::variants models, such as variant result models1 (.vrm), feature models (.xfm), and family models

(.ccfm) can also be opened via . Please note that family models (.ccfm) are not listed per default. You can enableloading family models in the Integration preferences on the Visualization tab.

1You can create a variant result model in pure::variants by clicking the Save Result to File button that is shown in the toolbar of a variantdescription model.

Page 14: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

14

Live Connection with pure::variants

Since pure::variants 4.x, changes of the loaded pure::variants models are propagated live to the Integration. Forexample, directly after editing the name or changing the selection of a feature the loaded models are updated inthe Integration window. To enable this live update, the following prerequisites need to be fulfilled:

• the opened model needs to be located in an Eclipse workspace

• the changes have to be done on the same Eclipse workspace using pure::variants 4.x or later

• either a configuration space, feature model or family model needs to be loaded (Variant result models can onlybe updated automatically when the .vrm file is saved)

If a visualization is active when a loaded model has changed, a pane is shown that informs you about a pendingvisualization update (see Figure 18, “Information about Pending Visualization Update”). When pressing the pane'srefresh button, the visualization is updated.

Figure 18. Information about Pending Visualization Update

When the used models of a configuration space have changed or a new variant model was added to the configu-

ration space, a live update of the currently loaded models is not possible. In this case, you can press to man-ually reload all pure::variants models and refresh the current visualization. To unload all models and free the

pure::variants license, press .

Saving and Loading pure::variants Models

To ease the work with pure::variants Integrations, the last loaded model locations are saved, so that the modelwill be opened again automatically, next time you start the tool. Per default, these model locations are saved onlyfor you on your local machine. If you want to save the last loaded model locations for all users, who are using acertain EA project, you can select checkbox Store the selected pure::variants model location(s) in the current EAproject on the last page of the open model wizard. Then everytime a user opens that EA project, the pure::variantsmodels stored in the document will be opened instead of the locally stored models (if they can be found on theuser's machine).

Furthermore, a list of the latest loaded models can be accessed via the small arrow next to the button.

Please note that models are saved relative to your current workspace, which is the workspace where your currentmodel is located in or linked to. Therefore, you may be asked for your current workspace location when loadinga model from a different workspace, or a model that is not located in a workspace (but may be linked into aworkspace). Hint: If you want to know where exactly the loaded model is located, you can hover over the nameof the model. A tooltip will show the full path of your currently loaded configuration space or model.

If you do not want to load a model again on startup, you can clear the stored model locations from the user and/or document settings. For details, see the section called “Manage Settings”.

Removing Old Model References

Since the loading of models has changed extensively in pure::variants Integrations of version 4.x, Integrations nowsave pure::variants models differently in the current document than they did in version 3.2.x. Therefore, referencesto models loaded with version 3.2.x may still exist in your document, but are not used. This may be as intendedif you still also need to open the document with an Integration of version 3.2.x. However, if this is not necessary

Page 15: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

15

you can remove these references from your document: Open the Integration preferences and press the RemoveReferences button in the lower part of the Log tab (see Figure 28, “Preferences Dialog Log Tab”).

Model Visualization Preferences

In the Integration preferences, you can set how pure::variants models will be displayed and which model types

are supported. To do that, open the Integration preferences by pressing and go to the Visualization tab (seeFigure 19, “Preferences Dialog Visualization Tab”). The first dropdown box enables you to set how elements inthe pure::variants model view are labeled. Furthermore, you can limit how many characters are shown for eachelement in the tree, enable or disable the loading of family models, and set whether attributes are shown in themodel tree. To also show attributes inherited from parent elements, select Show inherited attributes.

Figure 19. Preferences Dialog Visualization Tab

Manage Settings

In the Integration preferences, you can also manage settings stored by the Integration. You can, for example,add or remove known workspace and server locations or clear certain settings. To do that, open the Integration

preferences by pressing .

Here, you can find tabs User Settings and Document Settings.

On tab User Settings, you can manage settings that are stored only on your local machine, specifically for youruser. (see Figure 20, “Preferences Dialog User Settings Tab”). This includes server and workspace locations,dialog decisions, the history of previously loaded pure::variants models, and so on. The first section, Defined

Page 16: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

16

Server Locations enables you to add, edit and remove the server locations that are not locked. The second sec-tion, Defined Workspace Locations enables you to add and remove the workspace locations. The last sectionReset User Settings enables you to clear the selected settings. For example, you can select checkbox Last loadedpure::variants model(s) and press the clear button, to make sure no pure::variants model is loaded from the usersettings at startup of the Integration.

Figure 20. Preferences Dialog User Settings Tab

On tab Document Settings you can manage all settings that are stored in the current EA project. For example, youcan clear the last loaded pure::variants model from the current document, so that, when you or other users nextopen the current EA project, the Integration will load no pure::variants model stored in the document.

Adding and Editing Variability Information

To add and maintain the variability information of an Enterprise Architect project more efficiently and less er-ror-prone, the Integration provides a Constraint Editor.

Accessing the Constraint Editor

You can open it through the context menu of various UML elements. In Figure 21, “Accessing the Constraint Ed-itor” the Constraint Editor is being accessed to edit the constraint "Temperature" of the class TemperatureSensor.Furthermore, it is possible to add new pure::variants constraints to various UML elements, such as classes, states,objects, etc. You can edit or delete these constraints through the pure::variants context menu. Moreover, you canconvert non-pure::variants constraints (that are not contained in a UML element) to pure::variants constraints byselecting the context menu entry Convert to p::v Constraint.

Page 17: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

17

Figure 21. Accessing the Constraint Editor

Note

Please note that only one pvRestriction constraint is allowed per element. If an element with multiplepvRestriction constraints is transformed, the transformation is aborted.

Working with the Constraint Editor

The Constraint Editor features autocompletion and syntaxhighlighting (see Figure 22, “Using the Constraint Ed-itor”). You can automatically complete words by pressing CTRL + space. If more than one word is possible, alist containing possible keywords and features is displayed. For autocompletion the loaded pure::variants modelsare evaluated. Thus, it is recommended to load a pure::variants model before using the constraint editor (see thesection called “Connecting with pure::variants Models”).

Figure 22. Using the Constraint Editor

Page 18: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

18

Error Check

When you are done editing the pure::variants constraint and click OK, the entered expression is checked for errors.Errors in pvSCL scripts are reported if the script's syntax is not pvSCL compliant, or if an element is unknownbased on the loaded pure::variants models. Unknown elements are highlighted in red.

Visualizing Variability Information

Visualizations can help understand whether the added variability information produces the correct output. Thereare two types of visualizations: Visualizations of variants and visualizations of errors in variability information.

Note

Since pure::variants visualizations utilize the diagram element color, they reset the diagram color to thedefault color after visualization. This means colors set by using the controls above a diagram element'scontext menu, will be lost after visualization. To persistently set colors of an element or connector, pleaseuse the element's context menu Appearance to set its default appearance.

Variant Visualizations

Through variant visualizations you can preview the results of a transformation with pure::variants. For this visu-alization you need to load a variant model, from which the visualizations are generated. There are two types ofvariant visualizations: Result and Selection Visualizations.

When you select the result visualization, all elements that would be excluded in the corresponding variant aregrayed out. Figure 23, “Result Visualization” shows such a visualization in a class diagram. The classes Temper-atureSensor and PressureSensor are grayed out, since the assigned features Temperature and AirPressure are notselected in the loaded VRM.

Figure 23. Result Visualization

When you apply the selection visualization, all elements that would be included in the variant, and that are relatedto variability information, are highlighted in green. Figure 24, “Selection Visualization” shows a selection visu-alization. The class WindSensor is highlighted, since it is selected in the loaded variant model and is related tothe constraint "WindSpeed". Sensor and SensorData, on the other hand, are not highlighted, because they are notrelated to variability information.

Page 19: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

19

Figure 24. Selection Visualization

Problem Visualizations

Problems visualizations indicate where pvSCl problems in variability information exist (problems in the pvSCLexpression of pure::variants constraints). To be able to view Problem Visualizations, a Feature Model or a variantmodel has to be loaded. There are two types of problems: Elements with pvSCL errors are highlighted in red,whereas elements with pvSCL warnings are highlighted in yellow. Figure 25, “Error Visualization” shows anexample for the error visualization. The class WindSensor contains the constraint "Not(WindSpeed)", which isa syntactic error, since the keyword "Not" has to be in uppercase letters. Thus, the class is highlighted in red.Apart from problems, the visualization also highlights all elements with multiple pvRestriction constraints, sincemultiple pvRestrictions constraints on one element are not allowed, and cause the transformation to fail.

Figure 25. Error Visualization

Figure 26, “Warning Visualization” shows the warning visualization. This time, the class WindSensor is high-lighted, because it contains the constraint "Windspeed", which is semantically incorrect, since the loaded featuremodel does not contain a feature Windspeed (but it does contain a feature WindSpeed). You can easily identifythis typing error through the warning visualization.

Page 20: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

20

Figure 26. Warning Visualization

Visualizations in Enterprise Architect Database Projects

Since pure::variants version 4.0.3, visualizations are also supported for Enterprise Architect database projects. Toensure that visualizations of different users working on the same database project do not conflict, visualizations indatabase projects work on a temporary diagram instead of coloring the current diagram itself. When pressing thevisualization button, the current diagram is copied to a new model root node pure-variants-visualizations into apackage named after the current windows user (see Figure 27, “Visualization in an Enterprise Architect DatabaseProject”). When the Enterprise Architect project is closed, the package of the current windows user is deleted fromthe model again. This process ensures that each user has his own space for showing visualizations, which is neveroverwritten by another user doing a visualization.

To be able to return to the original diagram, a link is added at the top of the diagram. Hint: Since the refresh ofthe Project Browser collapses the tree, you can follow the link back to the original diagram and then press Alt +Shift + G, to select the original diagram in the Project Browser.

Figure 27. Visualization in an Enterprise Architect Database Project

Please note that due to technical reasons, the visualization only evaluates constraints in the context of the currentdiagram. This means that only constraints related to elements in the diagram, or their ancestor elements/packagesare evaluated for the visualization. Furthermore, visualizations are computed for the current diagram only. If youwant to show the same type of visualization for another diagram, you need to press the button again.

Page 21: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

21

Troubleshooting

If the Integration does not behave as expected, it may be useful to check its log file. You can find it in the Integration

preferences ( ) on the Log tab (see Figure 28, “Preferences Dialog Log Tab”). It also enables you to save it toyour disk or clear the contents of the log file. Furthermore, the Log tab provides the option to remove referencesto pure::variants models that can only be read by Integrations of version 3.2.x (see the section called “RemovingOld Model References”).

Figure 28. Preferences Dialog Log Tab

Known Issues

The following known issues exist:

• It is not possible to apply visualizations to operations or attributes (see Figure 23, “Result Visualization”).

• Visualizations in sequence diagrams cannot be displayed correctly.

• Editing constraints that are not contained in another UML element through the standard EA dialog causesincorrect pure::variants visualizations. Therefore, it is recommended to edit constraints using the providedpure::variants context menus to edit constraints.

• An issue in Enterprise Architect version 10 may cause the reset of the diagram layout, when elements arecolored. Hence, pure::variants visualizations are not supported in Enterprise Architect 10.

• A similar issue exists in Wireframe diagrams (tested with Enterprise Architect 12.1 and 13). Therefore,pure::variants visualizations are not supported in Wireframe diagrams (issue reference number: 17025470).

Page 22: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

22

• An issue in Enterprise Architect version 8 - 12 causes the pvSCL editor to fail when editing a rule that containsa single quote. This is fixed in Enterprise Architect 13.

• An issue in Enterprise Architect version 14 causes EA transformation to fail when security is enabled andWindows authentication is used. This is fixed in Enterprise Architect 15.

• An issue in Enterprise Architect would cause the preview in EA database projects to crash if the previeweddiagram contained elements of type 'ActivityParameter' or 'ObjectNode' in Enterprise Architect version 14 andabove or elements of type 'ActionPin' or 'ProvidedInterface' in Enterprise Architect 14. Therefore, the previewin EA database projects will ignore those elements until the Enterprise Architect issue is fixed. In the previewof local EA projects previewing ActivityParameters works fine.

Undo/Redo Behaviour Notes

After using any function of the pure::variants Integration for Enterprise Architect, Enterprise Architect's undo orredo function cannot be used any more.

2.5. Creating a pure::variants Project for Enterprise Architect usingthe New Project Wizard

Creation of the corresponding pure::variants project is supported by a "New Project" wizard. It creates a standardproject with most common settings, allowing to start quickly.

To start the wizard, select File->New->Project->Variant Management->Variant Project.

The wizard will ask for the name of the project on the first page (see Figure 29, “Running the pure::variants VariantProject wizard”). You should select the Standard project type, because this will create an initial pure::variantsproject with all needed models.

Note

If “Empty” is selected, just an empty project is created, to which all information has to be added manually.

Only in special cases the next page is of relevance. Here other projects can be marked as referenced projects.

Figure 29. Running the pure::variants Variant Project wizard

Page 23: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

23

The wizard creates several models. All have the name of the project (SimpleEAP in this case). It creates a featuremodel with just the root feature named like the project, a configuration space, an initial variant description modelin this configuration space and two folders input and output. The input folder should contain the EA projectdocument(s) to transform. The output folder will hold generated model variants. The layout of the project is shownin Figure 30, “Layout of a Standard pure::variants project”.

Figure 30. Layout of a Standard pure::variants project

2.6. Adding an Enterprise Architect Transformation topure::variants Projects for Enterprise Architect

For transforming EA project documents, a transformation module is needed. However, pure::variants projectscreated with the Variant Project Wizard do not contain a transformation module per default.

To add a Enterprise Architect Module, open the configuration space properties of the pure::variants project, i.e.right-click on the configuration space in the Projects View and choose Properties from the context menu. In theproperties dialog switch to page Configuration Space and there to tab Transformation Configuration.

Figure 31. Transformation Configuration

Page 24: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

24

Create a new module configuration with the marked button in the image above. Click on button Add after creatingthe new module configuration. This opens the transformation module selection dialog as shown in Figure 32,“Transformation Module Selection Dialog”.

Figure 32. Transformation Module Selection Dialog

Select Enterprise Architect Module and enter a name for the new transformation. Then, click on Finish. The trans-formation configuration should then look as shown in Figure 33, “Transformation Configuration with EnterpriseArchitect Transformation”.

The transformation configuration should then look as shown in Figure 33, “Transformation Configuration withEnterprise Architect Transformation”.

Page 25: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

25

Figure 33. Transformation Configuration with Enterprise Architect Transformation

The new transformation is inserted at the end of the transformation module list. It is strongly recommended toleave this module on the last position in the module list.

Note

If you select the Enable Update Support checkbox above the list of modules, your variant output will beprepared for merging custom changes made in a variant with a newly transformed version of that variant.For details, see Section 2.10, “Using the Enterprise Architect Project Variants” and section Variant Up-date in the pure::variants User's Guide.

2.7. Adding Enterprise Architect Projects to pure::variants FamilyModels

To specify one or more Enterprise Architect projects that should be processed during transformation, you needto add Enterprise Architect project information to a family models. The pure::variants Connector for EnterpriseArchitect recognizes the family model part ps:sparxseap as trigger for a transformation. Below this part must beat least one ps:file element pointing to an Enterprise Architect project file (.eap, .eapx, .feap).

Page 26: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

26

Figure 34. Family Model containing Enterprise Architect Project Information

The family model part ps:sparxseap is added to a family model by right-clicking on a component element andthen choosing New->EA Project File from the context menu. This opens the wizard for a new Enterprise architectproject file part as shown in Figure 35, “New Enterprise Architect Project File wizard”. Enter the name and pathto the project file, or navigate to an existing project file by clicking on button ... to the right of field file. Set keep-constraints to true if you want to keep the constraints during transformation. If it is set to false, all pure::variantsconstraints (pvRestriction, pvValueCalculation or pvValueChoice) will be removed from the transformation out-put. After finishing the wizard the part and the file element is created as shown in Figure 34, “Family Modelcontaining Enterprise Architect Project Information”.

Figure 35. New Enterprise Architect Project File wizard

Note

For Enterprise Architect projects, which are located on a database server, it is also possible to filter themodel root nodes that should be part of the generated variant. See Section 2.8, “Working with EnterpriseArchitect Database Projects” for details.

Page 27: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

27

2.8. Working with Enterprise Architect Database Projects

Enterprise Architect supports two types of projects: Local projects, which are saved in an .eap(x) file and projectsthat are located on a database server. The previous instructions of how to define an Enterprise Architect project astransformation input refer to local .eap(x) files. However, database projects can be set as transformation input in thesame way. To do this, a shortcut file is needed, which points to your database project. This shortcut can be createdusing Enterprise Architect: Open the database project you want to reference. Select File -> Save Shortcut.... In thedialog that opens, select the shortcut's target location. The created shortcut can be referenced in your pure::variantsproject as described in Section 2.6, “Adding an Enterprise Architect Transformation to pure::variants Projects forEnterprise Architect” or Section 2.7, “Adding Enterprise Architect Projects to pure::variants Family Models”.

Note

Enterprise Architect database projects can only be transformed when using Enterprise Architect 9 orhigher.

Additionally, for database projects it is possible to filter which model root nodes of the given project should becontained in the transformed variant (see Figure 36, “Enterprise Architect Master Project (left) and Filtered VariantProject (right) ” for an example).

Figure 36. Enterprise Architect Master Project(left) and Filtered Variant Project (right)

To enable this filter, follow the steps of Section 2.7, “Adding Enterprise Architect Projects to pure::variants Fam-ily Models” to prepare the transformation of an Enterprise Architect database project. Then add the attributeps:projects of type string[] to the existing ps:sparxseap family model part. Add all model root names thatshould be part of the variant as values to the ps:projects attribute.

Page 28: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

28

Figure 37. Adding ps:projects Attribute

Figure 38. Family Model containing EnterpriseArchitect Project Information with Project Filter

The transformed Enterprise Architect database project contains only the model root nodes given in theps:projects attribute (see Figure 36, “Enterprise Architect Master Project (left) and Filtered Variant Project(right) ”).

2.9. Working with Security-Enabled Enterprise Architect Projects

If security is enabled for an Enterprise Architect project (see Project->Security in Enterprise Architect), Enter-prise Architect will open a login dialog every time a variant is transformed. This means user interaction is re-quired for each transformation of an Enterprise Architect project. To support use cases where user interactionis not possible (for example when using an ANT transformation), the environment variables PV_EA_USER and

Page 29: pure::variants Connector for Enterprise Architect Manual

pure::variants Connector for Enterprise Architect Manual

29

PV_EA_PASSWORD can be set. When these are set, the transformation will try to open the project using the givenlogin data. If the entered login is not valid, Enterprise Architect will open a login dialog nonetheless.

Furthermore, please note that the security setting Require User Lock to Edit, will be deselected during transfor-mation and all current user locks will be cleared in the output document. Full locks, however, will not be cleared.Therefore any full lock needs to be removed from a constrained Enterprise Architect package prior to transforma-tion. If a fully-locked package is not touched during transformation, the full lock can remain.

2.10. Using the Enterprise Architect Project Variants

In the output folder (as defined in the transformation configuration, for standard projects the name is output) a subfolder with name of the VDM is created. Inside this folder the Enterprise Architect project is stored (see highlightedarea in Figure 39, “Layout of a Standard pure::variants project”). A double-click will open the generated EnterpriseArchitect project file in Enterprise Architect.

Figure 39. Layout of a Standard pure::variants project

The generated project file can be used like the original master project file. Since this model is technically a copyof the original model, all element ids etc. are the same as in the master project, permitting easy compare optionsof generated variants with each other or with the master Enterprise Architect project.

If you selected the Enable Update Support checkbox in the transformation configuration of your configurationspace (see Figure 33, “Transformation Configuration with Enterprise Architect Transformation”), multiple subfolders will be created below the folder with the name of the VDM. You can use the Enterprise Architect projectsin these folders to merge custom changes made in a variant with a newly transformed version of that variant. Fordetails, see section Variant Update in the pure::variants User's Guide.

Since per default a three-way merge of Enterprise Architect projects is not supported in Eclipse, you may need toexecute some merge steps manually or by using an external merge tool.

Page 30: pure::variants Connector for Enterprise Architect Manual

30