Exercise 5.6 - Adding SysML-DOORS NG Artifact Types
Objectives
The new learning objective of this exercise is to add additional DOORS NG artifacts for creating new mappings for Model Transform connections. These can be standard DOORS NG element types or user-defined element types.
Preparation
This exercise assumes the student has
Cameo System Modeler (or MagicDraw with SysML plug-in) supported version installed correctly on his or her machine with a valid license for use, and
Syndeia installed as a plugin for Cameo/MagicDraw with a valid license for use
Syndeia DOORS NG interface, correctly installed with a valid license for user
Syndeia Mappings license, to modify syndeia.mappings file from the Syndeia dashboard (without the special mappings license, existing mappings can be used, but not modified)
The user can use any DOORS NG repository they have available with the ability to create and edit elements within a DOORS project. This exercise assumes that the DOORS artifacts provided are compatible with your DOORS NG project. Otherwise, review Exercise 5.7 on adding DOORS artifacts to the Model Types list. It is generally advisable to carry out these exercises in a non-production repository, a "sandbox", set up for training and practice purposes. We recommend that the student view the videos 1.6, 1.7, and 1.8 in the Introduction Section of the Syndeia training materials before attempting this exercise. These videos provide important background on creating custom mappings. Hands-on tutorials omit much of the logic behind the actions in the interest of clarity and brevity. We will use the MagicDraw project Syndeia_DNG_Mapping_Tutorial.mdzip provided with the tutorials for this exercise, which loads the profile Syndeia_Mapping_Tutorials_Profile.mdzip (get it here - SysML Models, Profiles and Mappings). We also use the syndeia34Tutorial.mappings file provided, which has been installed in the .syndeia folder and renamed as syndeia.mappings.
Any Syndeia user can use or view the mapping specifications, but Syndeia requires a special license in addition to the regular Syndeia license in order to create, modify or delete mapping information. It is good practice to confine this duty to a very limited number of experienced users or system administrators, who will provide mappings for the general users.
Special Note on SysML Stereotypes
As demonstrated below, some mappings require special SysML stereotypes so that the SysML element involved in the mapping has tag value slots for the attributes to be mapped. In this exercise, you will use stereotypes from the Syndeia_Mappings_Tutorial_Profile.mdzip which should be loaded automatically with the model. However, in your own work, you can create stereotypes as needed and add them to your SysML model, either individually or as a profile. See the documentation for your SysML tool for instructions.
It is critical to remember that the mapping recognizes the stereotype by its ID, not its name. If the stereotype ID in the model is not the same as in the mapping, the mapping will not function as intended. The easiest way to avoid problems is to distribute the mappings file and the SysML profile as a pair which has been tested to ensure that the IDs match for the users.
Special Note on DOORS NG Artifact Types
Model transforms from SysML to DOORS NG are complicated by a special feature of DOORS NG. DOORS NG artifact types are registered on a project-by-project basis (and component-by-component if configuration managed). It is only possible for Syndeia to create a new artifact in a DOORS NG project/component if that project/component already recognizes that artifact type and the user has permission to create new artifacts in that project/component. Because of this feature, the user may need to modify the instructions for the following exercise to accommodate the specific DOORS NG project/component available, with its artifact types and user permissions, and complete the exercise.
In particular, artifact attribute ID's are project-specific. Artifacts in two different projects with the same name will have different attribute ID's and attribute mappings will not transfer.
To discover what artifact types are already available in a specific DOORS NG project/component, the user can
Open DOORS NG in a web browser
Read the DOORS NG Help guidance on managing Project and Component Properties which is available in the DOORS NG web service at the help topic:
Engineering Lifecycle Management > Engineering Requirements Management DOORS Next > Administering > Administering requirements projects or components > Managing project or component properties
Navigate to the desired project (Figure 1), click the Administration icon in the upper right corner, and select Manage Project Properties.
Figure 1 DOORS NG dashboard, Administration icon (Gear), Manage Project Properties
Alternately, if project has configuration management enabled, navigate to the desired project and component (Figure 2), click the Administration icon in the upper right corner, and select Manage Component Properties.
Figure 2 DOORS NG dashboard, Administration icon (Gear), Manage Component Properties
The available artifact types for this project/component (Sandbox in our example) are shown in the column on the left. If we select one of the artifact types, the Default artifact format field shows us what generic type of artifact it is (Figure 3).
Figure 3 DOORS NG dashboard, Default artifact format = Text
Syndeia can only handle default artifact formats of Text, Collection, or Module. DOORS NG artifacts having other formats, such as Diagram, cannot be created in DOORS NG by Syndeia using model transforms.
Exercise
Open the SysML project Syndeia_DNG_Mapping_Tutorial.mdzip (get it here - SysML Models, Profiles and Mappings), right-click the DOORS_NG_Mapping package, and launch the Syndeia dashboard. Select a Syndeia project, if required.
Go to the Mappings tab. The first task will be to make a new DOORS NG artifact type available for mapping.
Select DOORS NG under Model Types in the left column.
Initially, the window should appear similar to Figure 4, with three existing DOORS NG artifact types and three relation types available.
Warning: As discussed in the section "Special Note on DOORS NG Artifact Types", DOORS_NG artifact types are specific to an individual DOORS NG project/component. It is unlikely that the artifacts available to you in your project/component will be identical to those used in the following example, so you will need to modify these instructions to use the artifacts available in your project/component to successfully complete the exercise.Figure 4 Syndeia dashboard, Mappings tab, showing available DOORS NG artifact types
Add a new DOORS NG artifact type.
Right-click DOORS_NG under Model Types and select Add Artifact Type
A new window appears, Add DOORS_NG Artifact Type
Select the DOORS_NG Repository that you will be working with, using the pull-down menu (DNG 7.0.2 @ Intercax CM-enabled in our example). It may be necessary to actively select items from pull-down menus, instead of leaving the default choice without selecting it.
Select a Project in that repository, using the pull-down menu (Sandbox for Intercax Team in our example)
If project has configuration management enabled, select a Component using the pull-down menu (Intercax Team Sandbox in our example). If the project is not configuration-managed, this will be grayed out and you may skip to vii.
If project has configuration management enabled, select a Stream using the pull-down menu (Sandbox for Intercax Team Initial Stream in our example). If the project is not configuration-managed, this will be grayed out and you may skip to vii.
Choose Resource Format as Text, Collection or Module, using the pull-down menu (Text in our example)
Click the Get DOORS NG-Artifacts Types button.
Select the artifact type to be added from the pull-down menu under Types (Requirement in our example)
ID, Type, Name and Description fields will be populated, as shown in Figure 5. Name and Description should be modified to indicate the DOORS NG project to which they belong, as well as the component and stream if applicable.
Figure 5 Add DOORS_NG Artifact Type window
Specify the DNG artifact attributes to be available for mapping
Near the center of the window, click the Retrieve DOORS-NG Artifact Type Properties button.
The table Add attribute definitions… will be populated, as Figure 6.
Select the attributes you want to be available for mapping in the leftmost column (or click the Select All button) and click OK.
Figure 6 Add DOORS _NG Artifact Type window, lower half