Create A STATIC Use Case Diagram

In this lesson you will learn how to create a static use case diagram.

With static we means that you draw a picture without an underlying separation of data, model and view. Using models and views is of course the preferred way of creating architecture visualizations. But to learn Dragon1 a bit, it is wise to create first a static use case diagram.

We have pre selected the Use Case Diagram shapes for you in the Visual Designer if you follow this link: Create Use Case diagram we have ten easy steps for drawing a useful Use Case Diagram.

Here it goes!

To draw a STATIC Use Case Diagram follow all the next steps. This lesson takes about 15 minutes to complete. When you are finished you have been created a simple Use Case Diagram from scratch.

What is a Use Case Diagram

A Use Case Diagram is an essential part of UML, the unified modeling language. A use case diagram is a design, schema or description of a system from external usage viewpoint. This instead of designing and drawing the system from a developers point of view. Writing use cases are a deciding factor for building a system that meets the needs of the users.

An actor in a use case diagram is someone or something using a system. A use case in a use case diagram is a business goal, objective, function, task or activity.

Preparation

  • Login and startup the Visual Designer
  • Create a new cabinet or open an existing cabinet
  • Create a new dossier or expand an existing dossier
  • Create a new folder or select an existing folder
  • Insert a visualization in this folder by clicking on Insert Visualization in the Buttonbar
  • The New Edit dialog appear. Provide a name for the visualization. Something like 'New Coffee Machine'
  • Click OK. You now see the Use Case Diagram added in the Explorer Treeview

Setup

  • Make sure you have the visualization entity selected in the Explorer treeview.
  • Now drag the Abc shape to the canvas, to create a title element on the Diagram
  • Expand the Text Attributes panel in the Inspector on the right by clicking on the name of the panel.
  • Make sure the Abc text element is still selected.
  • Now enter a title for the diagram, in the title field of the Text attributes panel. Something like 'Coffee Machine - Use Case Diagram'
  • Drag a second 'Abc' element to the canvas.
  • Enter a subtitle for the diagram. Write down for instance a question that has to be answered with this use case diagram. Use this question as subtitle on the diagram.
  • Drag a square shape to the canvas and give it the title of the system you are designing. For instance a coffee machine.
  • Shape this square as a rectangle, it will be your system boundary or scope for your system. Any use case inside must be fulfilled by your system. Any use case placed outside is out of scope for your system. Make use of this option. It is as easy as that.


Drawing Actors

  • Drag an actor shape from the shapes panel. Do this three times
  • You see every time you add a shape the visualization is automatically saved. This will prevent any loss of data. If you want, you can switch off this behavior in your settings.
  • You can also duplicate a shape by clicking the plus sign in the smarttools that is shown above a shape when it is selected.
  • Expand the Text Attributes panel in the Inspector on the right
  • Enter in the title field a title for the actor. For instance: Employee, Repairman, Bank
  • You can also edit the title of a shape by double clicking on it. Tip: type in your letters slowly when inline editing. Also you can pressed enter creating a multiline title.


Drawing Use Cases with Associations

  • Drag a use case shape from the shapes panel. Do this five times
  • Give the use case shapes the following titles: Order, Prepare, Serve, Maintain and Pay.
  • A use case is about actors and systems doing something. Think of it like functions or actions: An employee order Coffee when he is thirsty. The machine prepares making the coffee. The repairman wants to do maintenance, etc....
  • Now draw connections from the actor shapes to the corresponding use case shapes. Do this by selecting an actor shape and drag the > button from the smarttool to the use case and then let go of the mouse button.
  • This simple line is called an association
  • Now a connection is drawn. And if you have attached the shapes correctly, you can move the shapes around and the connections will follow the shapes.
  • If a shape is not attached, you can select the head of a connection and draw it over a shape and let go of the mouse button.
  • Also you can change the flow of the connection by clicking on a line segment and by dragging it. Try it out and see for yourself how nice it works.


Extending Use Cases with <<extend>> Dependencies

(When I order coffee, sometimes I order sugar and milk, if I feel like it. This is an example of extend)
  • Suppose that both the Employee and Repairman can run a cleanup program on the coffee machine. Then they share the same behavior. In a use case you can place this in a separate use case with an extend relationship. We are going to do that now.
  • Add an actor shape on the canvas by selecting an actor and clicking on the plus sign and move the new shape to its correct place.
  • Give the shape the title: Person.
  • Drag the extend dependency from the shapes panel and draw connections from the Employee and Repairman to Person.
  • This type of connection or relationship is called a dependency
  • Now draw two extra use cases for ordering sugar and ordering milk. And draw the extend dependencies.


Include Use Cases with <<include>> Dependencies

(When a machine makes coffee, it must take in water. This is an example of include)
  • Suppose that several use cases share a common task. In that case you can create a new use case and include that one in the two first use cases.
  • In a coffee machine warming up is a task that is shared by the use case serve and the maintenance program. So draw a new use case and draw two <<include>> dependencies.


Use Generalization

If you have a coffee machine, you might want to support various payment systems: with coins and cards.

In that case you can create a generic use case and two specialized use cases with a generalization to the generic use case.

  • Draw three new use cases. Give them the titles: Pay, Pay with Coins and Pay with Card.


Saving, Printing, Sharing and Presenting
  • To save a version of your diagram, click on the Save Visualization button in the button bar.
  • To print your diagram, click on the Print in the middle top bar of your screen, above the drawing context. A printer friendly version of your screen is shown. From there follow the browser's printing features.
  • To share your diagram, click on the share link next to the print link. Fill the share data in the dialog and click OK. You have now shared your diagram in a channel on Dragon1, if you have chosen the publication status of world-wide.
  • Search for your diagram in the search bar of the Dragon1 website and check if your diagram communicates what you want.
  • To present your diagram go the Content Viewer and search for your diagram.
  • Switch to presentation mode and do your presentation on Dragon1 with your diagram.

Use the different association options, like extend, include and generalization in a smart way, to make your system less complex and your diagram better understandable to read.

For more information about Use Cases please read the UML books that are available anywhere or contact us. We got tons of examples to share with you.