Jump to Menu

How to Define Custom Model Element Properties?

Unified Modeling Language (UML) is a visual modeling language invented primarily for the analysis, design and implementation of software-based systems as well as for modeling processes. UML is well-defined, providing a rich notation set that makes the language applicable to different types of systems, domains and processes. However, as a general-purpose modeling language UML may not cater adequately to specific problem domain. The introduction of UML extension mechanisms was aimed to tackle this problem.

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

  • March 13, 2012
  • Views: 28,271
  • PDF

The UML extension mechanisms enable you to customize and extend the UML semantics, making the language more suitable for specific problem domain. You can create new model element types by creating stereotypes, which derive from existing UML types. You can add and define domain specific properties for both new and existing UML types using tags. The values of tags are known as tagged values.

Visual Paradigm supports profile, stereotype and tagged values. The focus of this tutorial will be on tagged values. You will see how to add and define tags to a UML model element type, readily to be used by the modeler. You will also see how to enter the values during modeling, and how to visualize the tagged values on diagram. We will draw a UML activity diagram for an order processing system to demonstrate the use of default tagged value.

Defining Default Tagged Values

  1. Create a new project by selecting Project > New from the application toolbar. In the New Project window, enter Order Processing as project name and click Create Blank Project.
  2. Select Window > Configuration > Configure Default Tagged Values... from the application toolbar. This shows the Configure Default Tagged Values window.
    Configure default tagged values
  3. The left hand side lists out the notations defined primitively by UML, BPMN and other modeling languages supported by Visual Paradigm. You can add your own properties to a supported type of notations by selecting the type and by adding the default tagged values. Let's try with a UML action. At the top left corner of the Configure Default Tagged Values window, enter Action as search text.
    Entering search text
  4. Select Action from the list.
  5. Now, you can add your own properties to UML action by adding tags. When you create actions later on you can enter the value of tags created here. Let's say we want to associate each UML action with a Web Form. Add a tag Form-ID that acts as a reference to the corresponding Web Form. Click Add at bottom right and select Text from the popup menu.
    Add text tag
    Besides text tag, you can add other kinds of tags like the model element tag that allows specifying a reference of model element as value and boolean tag that allows specifying either true or false as value, etc.
  6. Enter Form-ID as tag name.
    Tag created
  7. Let's say our ID has FRM- as prefix. We can specify it as the default value of tag so that when you create actions you do not need to enter FRM- over and over.
    Tag value entered
  8. Click OK to confirm the changes.

Entering Tagged Values

Create an activity with actions. Enter the form ID for each of the created action.

  1. Create an activity diagram Order Processing.
  2. Draw a diagram that looks like this:
    Simple activity daigram
  3. Supply the form ID associated with each action. Let's do this one by one. Right-click on the Login action and select Open Specification... from the popup menu.
  4. Open the Tagged Values page.
    Action specification
  5. Enter the form ID for the Login action: FRM-01.
    Tagged value entered
  6. Click OK to confirm.
  7. Set the form ID for the remaining actions:
    Action Form ID
    Create Order FRM-02
    Enter Payment Details FRM-02
    Confirm Order FRM-03

Showing Tagged Values on Diagram

You can optionally show the tagged values on the action shapes in diagram. Right-click on the diagram background and select Presentation Options > Show Tagged Values > Show All from the popup menu. Resize the shape. The diagram should look like this:


Completed activity diagram


Turn every software project into a successful one.

We use cookies to offer you a better experience. By visiting our website, you agree to the use of cookies as described in our Cookie Policy.

OK