Extend and customize UML with UML profile

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 for customizing the models for specific domains or platforms. Starting from Visual Paradigm for UML 7.2, UML Profile has been supported and you can create customized profile visually in diagram to fit for your need. This tutorial will teach you how to create customized profile in VP-UML.

January 07, 2010
User Rating: / 0
Views: 2413
PDF Link Add comments
Edition: Standard or above (Edition comparison)
Share |

To create customized profile:
  1. Switch to Model Explorer, right click on the project root node and select Create Profile.
    create profile
  2. Name the profile as Vehicle Engineering Profile.
    new profile
  3. Right click on Vehicle Engineering Profile, and then select Sub Diagrams > New Profile Diagram.
    new profile diagram
  4. Now you can model the profile in the profile diagram. Let's create a stereotype in the diagram.
    new stereotype
  5. The Select Base Type of Stereotype dialog will be shown, which allows you to specify the type of target model element for using the stereotype you are creating. Let's select Statics > Class as the base type.
    select base class
  6. Now a stereotype is being created in diagram. Name the stereotype as Vehicle.
    stereotype shape
  7. Right click on Vehicle stereotype and select Open Specification.
    open spec
  8. Switch to Tagged Value Definitions tab and now you can define tagged values for this stereotype.
    tagged val tab
  9. Press the Add button and you can select the type of tagged value you want to create from the drop down menu. Let's select Floating Point Number Tag.
    floating tag
  10. Name the tagged value as speed-limit, with Default Value as 0.0.
    create tag
  11. Repeat the steps to create the following tagged values, and press OK to close the specification dialog.
    all tagged values
  12. Stereotypes can associate with each other via composition. Let's create a stereotype Body for modeling the body of a vehicle in specific. Click on the Vehicle stereotype and drag out the composition icon.
    comp
  13. A new stereotype Body is created, which has class specified as base type automatically.
  14. Besides composition, you can also create specialized stereotypes. Let's create a stereotype Pickup Trunk which is a specialized type of vehicle. Click on the Vehicle stereotype and drag out the generalization icon.
    gen
  15. Here is the completed profile diagram.
    profile diagram
  16. Now your profile is ready to use. Let's create a class diagram and create a class Light Motor Vehicle.
    create class
  17. Right click on Light Motor Vehicle, and select Stereotypes > Pickup Trunk.
    select stereotype
  18. Right click on Light Motor Vehicle again and select Open Specification, switch to Tagged Values tab. Now you can see the tagged values defined in Pickup Trunk stereotypes are added to Light Motor Vehicle, including tagged values from Vehicle stereotype.
    tags
  19. From our profile diagram the super-stereotype of Pickup Trunk is composite of various stereotypes, such as Body and Interior. We can add the tagged values associated to those stereotypes directly to Light Motor Vehicle. Press the Add button and select Body.
    add body
  20. A new tagged value entry for the Body stereotype has been inserted.
    body stereotype
  21. Click the ... button in the Value cell of Body tagged value, the Sub-level Tagged Values dialog will be displayed. You can specify the tagged values of the Body stereotype directly here.
    sub tag
Comments (1)

Reorder

written by Christian on February 23, 2010

The function to reorder the "Tagged Value Definitions" is not available. How can I rerange my list?

Write comment

Name

Email

Title

Comment

Write the displayed characters

security code