Domanda

Ho un caso d'uso associato a due attori in un sistema.Questo caso dell'uso estende un altro caso d'uso, ma solo uno degli attori può utilizzare il caso di utilizzo esteso.

C'è qualche modo per rappresentare la natura condizionale dell'estensione del primo caso d'uso?Oppure, ho bisogno di specificare nella documentazione del caso di utilizzo che la custodia dell'uso iniziale può essere estesa solo per un tipo di attore?

Grazie.

È stato utile?

Soluzione

If I understand the question, it sounds like you need two kinds of actor. You (possibly) need to make one actor type a generalisation by abstraction. To put it another way, you need to create a specialised actor who inherits permissions of the more general actor.

( Please excuse my horrible ascii people and generalisation arrow!)

    O                 __________________
   ---               /                  \
    |     -----------|   Use Case 1     |
   / \               |__________________|
                     | extension points |
   User              |   if Super User  |
    ^                \__________________/
   / \                        /\
  /___\                        | <<extend>>
    |                          | (if Super User)
    |                          |
    |                          |
    O                 _________________
   ---               /                 \
    |     -----------|   Use Case 2     |
   / \               \_________________/
 Super User         

This specialised actor (Super User) can then engage in both use cases, but the normal user only the first one (the non-extending use case).

Note that a Super User may or may not be able to initiate directly use case two. It depends on the use case and the problem domain as to whether that makes sense or not.

You then probably want to use an extension point (something like "Super User" or "if Super User") in the extended use case which creates a decision point to the extending use case.

Here's an example of a more legible diagram.

Also here's the definition of extension point from The UML Reference Manual (2nd Edition) (p358):

A named marker that identifies a location or set of locations within the behavioural sequence for a use case, at which additional behaviour can be inserted.

The name of the extension point name can be whatever you want. Whatever makes sense to you. There are no syntactic rules. Whatever you put on the diagram should appear somewhere in a textual use case description (i.e., the steps of the use case).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top