A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service
First, the uses and Extends Yes UML Stereotypes (constructed) in 1.1, they are in UML 1.3 (the uses relationship has been abandoned in rose2003) was revised Include (Instead of the original uses) and extend;
2. What needs to be clarified is Include And extend are used to indicate associations between use cases )?? Dependency;
Third, there is an example to explain Include And extend usage: In an ecommerce system, there are three Use Cases
Authorize credit purchase this use case comes from the external system.
Here, the "Browse catalog" Use Case "extend" place order "is used because" place order "is a special case of" Browse catalog ". You can place order at any time during browse.
The "place order" use case 《 Include "Authorize credit purchase" use case. This is because the user must pay the order with the credit card, which leads to a problem of verifying the credit card, therefore, the "place order" use case must include the "authorize credit purchase" Use Case.
In Mr yukbin's words: for example, if you go upstairs, you may have to take the stairs (Include), Of course, you may have to go to the bathroom (extend) halfway ).
Extend, one of the most common connections (parallel connections)
The definition indicates that two use cases have an extended relationship, and the latter is an extension of the former information or business functions. If a extend B, B is a conditional execution case of.
The format indicates that newusecase (a) is called every time, the system may also call newusecase2 (B), but not every time newusecase2 is called. Newusecase2 is only an extended use case of newusecase1, And the relationship is not Include So tight
For example, logon is a use case. If we regard logon failure as a use case, the relationship between this use case and logon is extend. (Of course, logon failures are generally handled as an alternative stream ).
The description refers to the additional force insertion. the uninformed extension relationship based on the force is used to process the variant of the use case. If the content of the variant is included in the optional process of the same use case, the problem becomes complicated and difficult to understand. Generally, the basic process is established in the Basic use case. Different variants are built into different use case extension basic use cases. Is to model the basic process, and then expand through the extension case. The basic use case does not know the extended use case. The extended use case is usually inspired by a certain point of the basic use case and specific conditions. Extended use cases are usually complementary to basic use cases and optional behavior modeling. Extended relationships can be viewed as interruptions. (For example, "querying personnel information" is a use case and "modifying personnel information" is a use case. Then "querying personnel information" extend "modifying personnel information ", it indicates that modifying personnel information involves querying personnel information, which makes the traditional
More accurate Audi design)
Use the condition if usecase A is mixed into usecase B (it can be said B allows optional functionality of a To be inreceivated into itself), but a is not added as a whole, it is divided as some parts but all the parts are all added to B. I think this relation can be described
Use of Basic Principles 1. The basic use cases (that is, the extended use cases) and the extended use cases should be independent of each other. In other words, the basic use cases must be complete and the extended use cases should be separated from each other. First, describe the basic behavior (or feature)-forcibly describe the added additional behavior-forced or optional 2. Extend the Layered Depth of dependencies. Generally, you should not extend an extension case.
Include Is a include link, one of the most common links (series)
The definition indicates that two use cases have an inclusive relationship, and the latter is part of the former. If
Include B, then a case may execute B case. If a executes B, it must be fully executed.
The format indicates that newusecase1 is called every time and the system also calls newusecase2. Newusecase2 is actually a subsidiary use case of newusecase1. Of course, newusecase2 may also be a subsidiary use case of another use case.
For example, registration is a case, registration is another case, and registration is included in the case. However, registration is not always required for medical treatment, because the emergency department does not require registration (that is, the case does not contain registration cases). However, if registration is required, this case must be completed.
It indicates that the usage relationship contains repeated content in multiple use cases to avoid duplication. This part of common use case fragments can be used by multiple use cases. For example, withdrawal and transfer require user authentication. Is the extraction of repeated parts of multiple use cases, and through the use case Include Link. The include use case knows that it is included. It is often referenced in the text description by underline. The action stream of the included use case is inserted into the action stream of the included use case. Generally, the included use case is not a real use case, but a piece.
You can name it sub use case. The inclusion relationship can be viewed as a call or reference.
Use the condition the use case being defined ded is known as the limit sion use case, And the use case doing the including as the base use case. Include Relationship is appropriate if a complete sequence dibytes
For the base case wowould Include The sequence divisor for the sequence sion case, and the interactions in the sequence sion case are completed MED without interruption
How to Use extend and uses (andIncludeIt seems that there is no essenceDifferences?? First, the two are equivalent. Uses =Include)
This metaphor is useful if you have learned the basics of circuits.
The use case is a public connection circuit in multiple connection circuits.
The arrow points from the used main circuit to the used public circuit.
The expansion relationship is related to the parallel circuit.
An extension example is a circuit with a concatenation circuit. All other parallel branches except one basic branch are in the parallel section. The expanded use case is the entire series circuit connected by a basic branch in parallel. -- Each parallel branch is an extension (replaceable path) of this basic branch. In this circuit, the circuit of the series part is public.
The arrow points from the parallel branch to the series circuit with the basic branch.
The link is the same part of a shared connection path;
An extension is a path with a parallel path. The parallel part shares the connected part.
Both are reuse mechanisms.
When creating a use case model, you should focus on the main character and carefully analyze the requirements of the main character and the main character. What services should the main character provide to achieve.
Find all the service projects provided to the protagonist. Each Service Project is a use case.
Then, use case Optimization
Check whether there is a public part between the use cases and propose the public part as a public service.
There are two ways to find the public part:
1. check whether the same service content exists between multiple services. In some cases, put forward the same part to see if it can be used as an independent public service. If yes, the relationship is used to express the relationship between multiple services and this public service.
2. it is found that a service project contains a variety of alternative services for the main character to choose from. In some cases, the available service content is extracted, see if it can be used as an independent personalized service. If it can, use the extended relationship to express its relationship with the original service, which expands the original service. It shares with other services that can be replaced by it.
The relationship corresponds to the public function points in different processes;
The extension relationship corresponds to the personalized Function Points in the public process.
Rose98 has the use relationship. If it is a use B, it can be understood that a calls B.
After rose2000, there will be no such relationship. There are three relationships:
Generalization (this can be understood as inheritance. generalize is used to model a number of similar actions, that is, "some kind of", such as withdrawals, deposits, transfers, and payments are all transactions executed on the ATM. This is a confusing concept. From the object-oriented perspective, there is an ISA relationship between the parent case and the sub-case, that is, the sub-case ISA parent case. That is to say, all parent cases can be replaced by child cases, which are more conceptual .)
The source of these interpretations is the RUP.
UMLThe 1.4 Specification defines the relationship between three types of UC and UC, and its semantic interpretation is as follows:
1) Extend: An extend relationship between Use Case A and use case B indicates that an instance of B is defined from a's behavior (by accident or optional) extended. Dotted line + arrow + stereotype symbol
2) Generalization: A generalization relation from uc c to uc d indicates that C is a special case of D (specialization ). Solid line + hollow arrow symbol.
3)Include: One from E to FIncludeThe relationship indicates that an instance of E also contains the action of F. Dotted line + arrow + stereotype symbol.
First, I did not see the ambiguity from the 1.4 specification. If I follow this rule, I feel that I understand it. However, let's look:
In the 1.4 specification, I did not see the uses relationship, or I may not have read it carefully. I have seen this relationship in the use of Rational Rose (2000e). Its explanation is as follows:
"Uses" is a type of generalize specification (a stereotype set on generalize specification), used to indicate that one use case uses another use case function.
An example of uses (E1) is as follows: "UC: withdrawal" uses "UC: Verify account" because "UC: "Verification account" may be called by other UC (such as deposit and account checking ).
But is the uses of E1 a generalization relation? Is "UC: Withdrawal" a specialization of "UC: verification account? I couldn't understand it for a moment.
Let's look at one of the following information in the help of Rational Rose:IncludeExample (E2 ):
"UC: purchasing goods" has des "UC: Adding orders to the warehouse system", because "adding orders to the system" is required for "shopping ", the former contains the behavior description of the latter. So isn't E1 similar?
Another one of Rose 2000eIncludeExample:
"Fill customer order"Include"Ship customer order", while "ship customer order" to "delivery carrier" has a one-way Association.
But how can fill customer order include the behavior of Ship customer order? There may be a connection between the two processes. OrIncludeThere is a usage for this purpose. What is the difference between this and uses? However, the extend relationship should be used for the link in this example.
After so many confused analyses, I usually do not use both uses andIncludeLink, I usually useIncludeRelationship and extend relationship.
The concept of the extend relationship is clear. When a behavior of a may occur to another series of behaviors (pay attention to this optionality), another series of behaviors can be added to B. If B is very simple and will not be extended from other behaviors to B, I will write this extension into a branch process.
As for the generalization relationship, it should be noted that the generalization relationship between C and D contains the concept that D shares the structure and attribute of C, and D may be more generalized. However, apart from the uses relationships that have not been clearly defined in the textbooks, they are rarely used. So I did use very little. IncludeUML1.4 spec has not seen any examples in this regard.
when there is ambiguity in semantics, I have found a lot of materials, and I think these materials have different opinions. Therefore, we recommend that you use UML 1.4 standard. Other documents are used as an aid. In fact, if I remember correctly, uses, extends the symbols used in Rose 98 are different from those in 2000e. Therefore, it is relatively unreliable. Of course, these two versions may follow different standard versions, and I do not want to go further.
Start building with 50+ products and up to 12 months usage for Elastic Compute Service