Does generalization exist in UML Use Case Diagrams?

前端 未结 4 1086
情话喂你
情话喂你 2021-01-15 11:43

I\'m trying to model some requirements and I saw some examples in the web with use cases generalization, but the UML 2.5 standard review doesn\'t say anything about generali

相关标签:
4条回答
  • 2021-01-15 12:11

    I don't know if use case generalization is "supported" by an official UML standard. But

    • it is supported by Kirill Fakhroutdinov's online book (a site that I personally use as "standard" reference) at http://www.uml-diagrams.org/use-case.html#abstract-use-case
    • it is supported by the Agile Modeling online book at http://www.agilemodeling.com/essays/useCaseReuse.htm#InheritanceUC
    • it is supported by the Sparx Systems Enterprise Architect tool
    • it is supported by the Modelio the open source modeling environment tool

    So my conclusion is that use case generalization is supported just enough and practically you can use if you need it.

    But more usual way to express that one use case is specialization of another use case is (IMO) through the <<extend>> relationship. See http://www.uml-diagrams.org/use-case-extend.html and http://www.batimes.com/articles/use-case-goals-scenarios-and-flows.html (and Wikipedia) for some more detailed discussion

    0 讨论(0)
  • 2021-01-15 12:24

    As gwag has mentioned, generalization/specialization is indeed included in the use case spec. What's more, there are plenty of situations where it is useful. Here's an example, from this page:

    0 讨论(0)
  • 2021-01-15 12:27

    Since a UseCase is a Classifier, they can be generalized. The UML 2.5 spec contains an example of this in Fig. 18.11 on p. 686 (the "ATM Services" example).

    0 讨论(0)
  • 2021-01-15 12:29

    Tricky.

    While the Generalization relationship is defined as going between two Classifiers, and a Use Case is itself a specialization of a Classifier, the semantics of the Generalization relationship are primarily focused on Features (eg Attributes). These are inherited, but relationships are not.

    On the other hand, the UML specification itself includes an example of use case generalization (2.4.1 Superstructure, fig 16.7, p 609).

    Back on the first hand, the same specification omits generalization in table 16.1, "Graphic nodes included in use case diagrams" (p 611-613), but does include the two main intra-use case relationships; Extend and Include.

    On the other hand again, the same table includes Actor but excludes the Association between Actor and Use Case.

    Sadly, the UML specification is in many respects a horrifying mess, and the 2.5 version is in part an attempt to rectify this.

    On balance, I would say no - you can't generalize between use cases.

    0 讨论(0)
提交回复
热议问题