Use case diagram

Source: Internet
Author: User

Many of the most common causes of software project failures are focused on poor communication or lack of communication between "project key stakeholders". When there is a lack of alliances between development agencies and business advocates, it is even more critical. Business people may know that they have a problem to solve, but the development leader receives only a general description of the business requirements and some specific requirements.


In the UML modeling language, a "use case diagram" allows a development organization to understand the goals of a business, or it can be cumbersome for business people. A use case diagram shows the context of the system to be built and the functionality it provides. They describe who interacts with the system and what the outside world wants the system to do.


Basic concepts: Performers


Performers are entities that interact with the system, which can be human or other systems. Performers are located outside the systems they use. With a stick-like villain. As shown in the following:


Of course, when considering the performer, the most consideration is to think about the role of the performer. A different character, the corresponding representation is different.


Basic concepts: Use Cases


Use cases represent what the performer wants the system to do for them. Use cases in the UML "use case diagram", we use some ellipses to represent. A use case is more than a function that the system can provide, and from the perspective of the performer, the use case must be a "complete" activity flow that provides the performer with "value". A use case is a specific way of using a system through a certain part of the functionality ... Therefore, the use case is a specific sequence of related transactions, and the executor and the system perform these transactions in a conversational manner ... From the user's point of view, each use case is a complete sequence of events in the system.


As shown in the following:

" Manage the Garden", "Modify the Crop Encyclopedia book"


Basic concepts: Use case diagrams


A use case diagram is formed by connecting the performer to the use case using the Basic association. In the use case diagram, this association is represented by a solid line. The association in a use case diagram indicates which user initiated which use case. As in:


The association in a use case diagram indicates which user initiated which use case. For example, only the performer gardener can maintain the tank, but all performers can view the report.


1. Identify use case details

When determining the functional details provided by a use case, or specifying a complete sequence of events, a better approach is to use other

UML models (such as activity diagrams) and text specifications. In the UML use case diagram, the use case specification has many different forms. But most of them contain the following information:


The name of the use case,


A brief description of the purpose of it


Optimistic flow (i.e. everything is OK, the flow of events occurs in the use case)


One or more more realistic processes (that is, if things do not follow the process of desire to occur)


2. Example of use case specification


Examples of such as "maintenance vehicles" use cases.


Use Case Specification Description

Use case name: Maintenance Vehicle "

Use case Purpose: This use case provides maintenance functions of the vehicle. This use case allows the executor to maintain the maintenance and maintenance of the vehicle.


Optimistic process:

1. The performer checks the current state of the vehicle.

2. The executor decides to maintain the vehicle (cleaning, replacing oil ...). )。

3, the executor decided to the vehicle damage place maintenance (paint, replacement parts ...) )。

4, maintenance completed, maintenance completed

5, the implementation of the next vehicle maintenance and maintenance


Actual flow:

The optional process for conditional triggering pairs is as follows:


Condition 1:1, insufficient water, not enough to complete the car wash operation.

Tip: Remind the performer that there is not enough water to reach the required amount of washing and display the available raw materials. Remind the performer to choose to terminate the service or reset the fill volume.

Select: If you choose to terminate the maintenance, perform the 5th step of the "optimistic process".

If you choose to re-set the fill volume, complete the Add water, and then perform the 2nd step of the optimistic process.


Condition 2: ...


Of course, other useful information can also be added to the specification, but be clear, such as entry criteria (what must be true before executing this use case), exit criteria (what must be true after executing this use case), constraints, assumptions, etc.


The exception is that the use case specification should not be too long ... It should only have a few pages. If the specification is very long, either you are doing too much of the use case, or you are designing a use case that is actually multiple use cases, all according to your own specific circumstances.


Advanced concepts: "include" and "extend" relationship


There are two types of relationships that are primarily used to organize use case models ... include and extend:


1. "Include" relationship

For example, this diagram shows that the Update Crop encyclopedia use case contains the view reports use case. This means that the View reports must be executed when the update Crop encyclopedia is executed. If there is no view Reports, the Update Crop Encyclopedia cannot be considered complete.


When a contained use case executes, it is embodied as a containing point in the use case specification. The include point indicates where the outer-layer use case is executing the included use case.


2, "extend" relationship

The extend relationship, in a use case diagram, generally indicates that certain activities can be performed as part of a use case, but it is not necessarily the case that the use case can be successful. As in, when the performer gardener executes manage garden use case, he may want to see some reports, then he will execute the view reports use case. However, when the Manage garden is executed, the View reports is not required and the Manage garden itself is complete. So our "extend" shows that the view reports use case extends the Manage garden use case.


When an extended use case is executed, it is represented as an extension point in the use case specification. An extension point indicates where the extended use case is performed for the outer layer use case.


When you do not know exactly which relationship to use in the use case, you can distinguish it by borrowing from the following table:



Advanced Concepts: Generalization


The concept of generalization, in addition to being represented in a class diagram, can be demonstrated in a use case, a use case can have some common behavior, and other use cases (child cases) can be modified by adding steps or other aspects of the essence to modify these common behaviors. Example: The use case for buying tickets in

P Urchase ticket contains the basic steps required to purchase any ticket, and the sub-use case is specific to the type of ticket purchase ticket.

Use case diagram

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.