Visual Paradigm logo
Jump to Menu

How to Configure Stereotypes with Profile Diagram?

Unified Modeling Language (UML)�is a general purpose modeling language which is widely used in modeling software systems. In some occasions, UML may not be precise enough for modeling specific problem domain. The�UML Profile�is an extension mechanism to customize the models for specific domains or platforms. This tutorial will teach you how to create customized profile in�Visual Paradigm.

Compatible edition(s): Enterprise, Professional, Standard, Modeler

  • March 6, 2016
  • Views: 23,875
  • PDF

  1. Create a profile by selecting Modeling > Profile > New Profile from the application toolbar.
    New profile
  2. A new profile diagram is created and you are prompted to enter a name. Enter Vehicle Engineering Profile as name and press Enter to confirm.
    Entering profile name
  3. You are going to model your profile in this diagram. Let's create a stereotype first. Select the Stereotype tool from the diagram toolbar.
    Selecting stereotype tool
  4. Click on the diagram to create a stereotype. You are immediately prompted to choose the base type of this stereotype, which is the type of element for which the creating stereotype will be used. Expand the Class node and select Class.
    Selecting base type
  5. Click OK to confirm.
  6. A stereotype is created in the diagram. Enter Vehicle as its name and Enter to confirm.
    Sterotype created
  7. Let's define some tags associated with this stereotype. Right click on the Vehicle stereotype and select Open Specification... from the popup menu.
  8. Open the Tagged Value Definitions tab.
  9. At the bottom of the tab, click Add and then select Floating Point Number Tag from the popup menu.
    Adding floating point number tag
  10. Enter speed-limit as tag name and press Enter to confirm.
    Tag added
  11. Create two integer tags passenger and id, and one enumeration tag automatic-transmission.
    Tags added
  12. Let's configure the possible values for the enumeration tag automatic-transmission. Click on the ... button in its Default Value cell.
    Edit default value of tag
  13. In the Edit Enumeration window, click Add to add and then enter yes as value. Add another value no.
    Edit enumeration
  14. Select yes and check Default value to make it the default option.
    Select default value for enumeration
  15. Click OK to confirm and return to the specification window.
  16. Click OK in the specification window to return to the diagram.
  17. Let's create the other stereotypes in this profile. Move your mouse pointer over the Vehicle stereotype.
    Placing mouse pointer over class
  18. Press on the Resource Catalog button that appear at the top right of shape. Drag it out.
    Dragging Resource Catalog
  19. Release the mouse button in empty space. Select Composition -> Stereotype from Resource Catalog.
    Select composition
  20. A new stereotype is created and has Class automatically chosen as base type. Enter Body as name and press Enter to confirm.
    Stereotype created
  21. Besides composition, you can also create specialized stereotypes. Let's create a stereotype Pickup Truck which is a specialized type of vehicle, using Resource Catalog. This time, choose the resource Generalization -> Stereotype.
    Select generalization.png
  22. Up to now, your profile diagram should look like this:
    Specialized stereotype created
  23. Apply the techniques taught above to add tags to the new stereotypes. Add a text tag painting to Body and a floating point number tag cargo-capacity to Pickup Truck.
    Tags created
  24. Draw two more specialized stereotypes Mini and Convertible from Vehicle. Draw another composite stereotype Interior from Vehicle, and another composite stereotype Seat from Interior. Add a text tag int-painting to Interior and two text tags texture and pattern to Seat. Your diagram should look like this:
    Completed profile diagram
  25. The profile is now ready to use. Let's create. Create a class diagram by selecting Diagram > New from the application toolbar. Select Class Diagram in the New Diagram window and click Next. Keep the diagram name as provided and click OK to confirm.
  26. Create a class Light Motor Vehicle.
    Class created
  27. Right click on Light Motor Vehicle and select Stereotypes > Edit Stereotypes from the popup menu.
    Edit strereotypes
  28. Select Pickup Truck on the left hand side and then click > to add it.
    Stereotype added
  29. Open the Tagged Values tab. The tags defined in the stereotypes are listed. Besides the tag defined in <<Pickup Truck>>, there are tags defined under its generalized stereotype <<Vehicle>> and its composited stereotypes.
    Tagged values tab
  30. Click the ... button in the Value cell of Body tag. The Sub-level Tagged Values window is shown. You can specify the tagged values of the Body stereotype there.
    Sub-level tagged values


Turn every software project into a successful one.