Jump to Menu

How to Link with Classes in Use Case Flow of Events

The flow of events tool is very helpful in describing and documenting user flows. In many cases, you probably would include references to data structures in your flows of events. As you can imagine, a common way to do it would be typing them in, manually.

Compatible edition(s): Enterprise, Professional

  • March 07, 2012
  • Views: 84,402
  • PDF
  • Video

However, as your project takes shapes, there could be changes made to the data structures during the process. Such changes would make your references in the flows of events outdated, knowingly or unknowingly. If it does come to your attention, a remedy might be to search all the outdated entries and update them. Again, manually. In addition to the time you would have to spend, there is also accuracy issue that comes with high volume of manual input. Or what if you missed one of the flows of events in your collection of use case diagrams?

Only if there's a way to synch the changes automatically... and yes, there is.

What will we do in this tutorial?

In this tutorial, we will show you how to add classes and attributes to a flow of events such that the flow of events will stay up-to-date with any changes made to the data structures being referenced.

We will be using a simple use case diagram example below.

sample use case diagram

Software We'll Be Using

As for the software tool, we will be using Visual Paradigm. You are welcome to download a free 30-day evaluation copy of Visual Paradigm to walk through the example below. No registration, email address or obligation is required.

Steps to Create a Class Diagram

We will now create a class diagram to document our data structure that elaborates the use case Process Order.

  1. In the use case diagram, select the use case Process Order and click the Sub Diagrams icon.
    click the sub diagrams
    Select Add > Other Diagrams > UML Diagrams > Class Diagram.
    select class diagram on menu
  2. In the new class diagram, click on any white space and you will see that the diagram is initially named Process Order after the use case. If you like, you can change it to something else. For now, we will just leave it as it is.
    name of class diagram
  3. From the Diagram Toolbar, drag Class over to the diagram. Name it Customer.
    create the customer class
  4. To add an attribute, right-click Customer and select Add > Attribute.
    right click to add attribute
  5. Name it name. Press ENTER.
    add attribute called name
    Drawing Tips
    When you press ENTER after entering the attribute's name, a new row is inserted below your current row for the next attribute. If you do not need it, you can hit the ESC key to delete it. The focus will go back to the previous row in dark red. If you click on the diagram background, the highlight will go away.


    drawing tip to remove last row
  6. Add another attribute named address.
    add an attribute called address
  7. Add another attribute named tel.
    add an attribute called tel
  8. We will now create a relationship between Customer to a new class. Click Customer and drag the Association -> Class icon over to the right. At where you want to draw the new class, release your mouse button.
    add a class called order
  9. Add an attribute called orderNumber.
    add an attribute called ordernumber
  10. Add an attribute called remarks.
    add an attribute called remarks
  11. A customer may place more than one order. To depict that, we will make the relationship one-to-many. Place your mouse pointer on the right end of the association (near the Order class) and right click on the bubble. Select Multiplicity and then * (the asterisk).
    set multiplicity
    An asterisk will be displayed to depict the multiplicity.
    association with asterick

Steps to Create a Flow of Event

We will now create a flow of events to document user flows for the use case Process Order.

  1. Right-click on the use case Process Order.
    open use case details
  2. In the Process Order Details window opened, select the Flow of Events tab.
    flow of events tab
  3. Click on the first row (in white space). Type in Login to the System. Press ENTER.
    Type in Click new Order. Press ENTER.
    Type in Select customer. Press ENTER.
    enter the first 3 steps
  4. To further elaborate step 3, we will now indent the fourth row which will become step 3.1. Click Increase Indent.
    indent step
  5. Type in Search customer by (leave a space at the end after 'by').
    mouse cursor to add attribute
  6. At the mouse cursor shown above, right-click and select Add Class...
    right click and select Add Class
  7. A dialog box will open displaying associated classes. Expand to Ordering System > Process Order > Customer. Select name under Customer. Click OK.
    select attribute called name
    Upon clicking OK, the attribute's name will then appear in the flow of events.
    attribute name added to flow of events
  8. Type in ' or ' after the newly added attribute name. Similarly, add another attribute address.
    attribute address added to flow of events

What happens if we change the data structure?

In the Customer class, let's say we want to change the attribute name to customerName. In the class diagram, double click on name and rename it to customerName.


change attribute from name to customerName

If you go back to the flow of events, you will see that the attribute change has already been reflected automatically.


flow of events automatically updates



創造美好 共同成長

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