Task |
Description |
Open the tutorial model file |
- Open Visual Paradigm and run the File -> Open Project command
- Navigate to and open the tutorial model [D# Engine installation folder]\Workspace\ExternalModels\Training\Tutorial\DemoDW\DemoDW.vpp.
|
Create subfolder (UML Package) for PersMaster |
- Right-click on the Source models folder in Visual Paradigm
- Select Model Element -> Package from the pop-up menu, and a new Package will be created.
- Write the name of the package in the Package Specification window that pops open, for example PersMaster person register
- Click OK.
|
Create new Class Diagram for Person and Gender |
- Right-click on the newly created folder, select Sub Diagrams -> New Diagram… from the pop-up menu and a diagram creation dialog pops up.
- In the search box, start writing class diagram, until the Class Diagram item becomes selected in the diagram type list.
- Double-click on the Class Diagram item.
- On the next page that opens, double-click the Blank template to create the diagram.
- Adjust the diagram’s name in the last step and click OK to create the diagram.
- Once the diagram is visible, click on it to exit the diagram name editor.
|
Create class Person |
- From the palette on left side of the diagram window, drag a Class element onto the diagram.
- Release the mouse, and the class is created in edit mode.
- Write the class name “Person”
- Press return.
|
Create associated class Gender |
- Grab the association tool above the right-side corner of the class in the diagram, and drag it to the right.The tool becomes visible when the mouse pointer is above the class.
- Release the mouse button while inside the diagram area.
- From the association type selector that opens, select association type Association -> Class (fourth from the left, top row), and a new class is created in edit mode, connected to the Person class.
- Call the class “Gender”.
The selected association type will from this point on be visible in the default section of the association type selector (upper left corner of the box). |
Add Person attributes |
- Right-click on the Person class and from the context menu select Add -> Attribute, or press alt-shift-A.
- In the attribute editor, press the delete key twice, deleting the dash-sign (“-“) before the attribute name.
- Write a plus-sign and then proceed to write the attribute name, Person Id followed by a colon and the name of the datatype to assign to this attribute, hetu.
- Press return. The attribute should look like +Person Id : hetu
- Repeat the process for these attributes (note that the + -sign will now be the default):
- Last name : lastname
- First names : firstnames
- Nickname : firstname
- Date of birth : birthdate
- Having pressed return after the last attribute, you are in edit mode, ready to write a new attribute. At this point press Esc to exit the attribute editor.
- Click the mouse on the diagram, outside the class.
|
Add Gender attributes |
Similarly to the last step, add the following attributes to the Gender class:
- Code : code
- Name : name
|
Set multiplicities |
- Right-click near the end of the association line between Person and Gender.
- From the pop-up menu, select
- Multiplicity -> 1 for the Gender end of the association.
- Multiplicity -> 0..* for the Person end of the association.
|
Set both classes’ Implement metadata parameter to True |
- Click on the Person class in the diagram. In the Property pane, you should see the UML Tagged values assigned to the class.
- Locate the Implement Tagged value.
- From its dropdown box, select True.
- Do the same for the Gender class.
|
Set Person.Person Id as Business key. |
- Right-click inside the Person class, on top of the Person Id attribute so that it gets selected (black background).
- From the pop-up menu, select Stereotypes -> Business key.
|
Set the Person.Date of birth attribute’s Rate of change to Never. |
- Right-click the Person.Date of birth attribute.
- From the pop-up menu, select Stereotypes -> DV20. Now that attribute will be assigned a number of Tagged values.
- Click outside the class box to deactivate the attribute selection.
- Right-click the Person.Date of birth attribute to re-select it. The newly assigned Tagged values are now visible in the Property Pane.
- From the Rate of Change dropdown box, select Never.
|
Set the Person.Gender association end’s Rate of change to Never. |
- Right-click the association between the Person and Gender classes.
- In the Propery Pane, locate the role B / Gender subtree.
- Locat e the Stereotypes item under the Gender subtree (not hierarchically under the Gender subtree).
- Click on the button with three dots next to the Stereotypes label.
- From the Stereotype selection box, tick the DV20 Stereotype.
- Click OK to close the Stereotype selection box.
- Click on the diagram background to deactivate the selection.
- Right-click the association between the Person and Gender classes, and locate the Tagged value off Gender. You will now see the Rate of change dropdown box.
- From the Rate of Change dropdown box, select Never.
|
Set Gender.Code as Business key. |
- Right-click inside the Gender class, on top of the Code attribute so that it gets selected (black background).
- From the pop-up menu, select Stereotypes -> Business key.
|
Export the model. |
- Select File -> Export… -> XML…
- In the dialog, select Simple XML Structure and check Export Project.
- For the Output path, navigate to your Working Directory (unless there already by default).
- Press OK to export the project.
|