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 18.0 - 19.0 (or MagicDraw with SysML plug-in) installed correctly on his or her machine with a valid license for use, and
Syndeia 3.3 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 - https://intercax.atlassian.net/wiki/spaces/SYN34/pages/2407364009). 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. It is only possible for Syndeia to create a new artifact in a DOORS NG project if that project already recognizes that artifact type and the user has permission to create new artifacts in that project. Because of this feature, the user may need to modify the instructions for the following exercise to accommodate the specific DOORS NG project 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, the user can
open DOORS NG in a web browser
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
The available artifact types for this project (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 2).
Figure 2 DOORS NG dashboard, Default artifact format = Text
Syndeia can only handle default artifact formats of Text and Collection. DOORS NG artifacts having other formats, such as Diagram or Module, cannot be created in DOORS NG by Syndeia using model transforms.
Exercise
Open the SysML project Syndeia_DNG_Mapping_Tutorial.mdzip (get it here - https://intercax.atlassian.net/wiki/spaces/SYN34/pages/2407364009), 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 3, 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. It is unlikely that the artifacts available to you in your project 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 to successfully complete the exercise.Figure 3 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 (DOORSNG 6.0.2 @ Intercax 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 (Unmanned Aerial Vehicle in our example)
Choose Resource Format as either Text or Collection, 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 4. Name and Description should be modified to indicate the DOORS NG project to which they belong.
Figure 4 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 5.
Select the Requirement (UAV) attributes you want to be available for mapping in the leftmost column (or click the Select All button) and click OK.
Figure 5 Â Add DOORS _NG Artifact Type window, lower half