Creating model elements from other model elements

 

Introduction

During the course of your work, you may wish to create model elements directly from other elements. To this end, Objecteering Scope Manager provides the "Model element creation wizard" command.

 

Through this command, you can select the type of UML model element you wish to create and enter its name.  Elements created via this command automatically bear a traceability link to the origin element.

 

 

Creating a single model element from another model element

To create a single model element from another model element, the "Model element creation wizard" command is used.  To run this command, simply carry out the operations shown below.

 

Creating a use case from a requirement

 

Steps:

1.      In the explorer, right-click on the element from which you wish to create your new UML model element (in our example, the "Change floor" requirement).

2.      In the context menu which appears, run the "Scope Manager/Model element creation wizard" command.  The "Model element creation wizard" window then appears.

3.      In the "Type of element to create" field, select the type of UML model element you wish to create (in our example, a use case).

4.      In the "Default name" field, enter the name of the model element to be created (in our example, "Elevator system requirements").

5.      Click on "Create" to confirm.

 

Note:      The  "Select element in browser" icon is used to jump to the base element in the explorer.

 

 

The result of this operation is shown in the screenshot below.

 

The newly created use case and the traceability link which links it to the "Change floor" requirement

 

 

Creating model elements from several other model elements

It is also possible to create model elements from several selected elements. In this case, you have two options:

·         to create one element for each of the elements selected in the explorer ("Create n elements" mode).  In this case, you simply have to specify the parent element and the type of element to be created.  Each newly created element takes the same name as its origin element and has a traceability link associating it with its origin element.

·         to create one new model element associated to all the elements selected in the explorer ("Create 1 element" mode).  In this case, you specify the parent element, the type of element to be created and the name of the element to be created.  The newly created element has a traceability link associating it with each origin element (see the two screenshots below).

 

Creating one element from three selected requirement containers

 

Steps:

1.      In the explorer, right-click on the elements from which you wish to create your new UML model elements (in our example, the "Change floor", "Be informed" and "Give order" requirements).

2.      In the context menu which appears, run the "Scope Manager/Model element creation wizard" command.  The "Multi model element creation wizard" window then appears.

3.      In this window, in the "Transformation mode" field, select the type of multi model element creation you wish to carry out (in our example, we have indicated that we wish to create one single element from the three requirements selected in the explorer).

4.      In the "Parent element" field, drag the element inside which you wish to create the new element from the  tab of the explorer, and drop it in the field.

5.      In the "Type of element to create" field, select the type of UML model element you wish to create (in our example, a use case).

6.      In the "Default name" field, enter the name of the model element to be created (in our example, "User requirements use case").

7.      Click on "Create" to confirm.

 

Note:      The  "Select element in browser" icon is used to jump to the base element in the explorer.

 

 

The result of this operation is shown in the screenshot below.

 

The newly created use case and the three traceability links which link it to the three origin requirements