Search code examples
umlspecificationsuse-case

What actor for a use-case of a system interacting with itself?


I am creating a use case diagram and the system interacts with itself. For instance, it is a patient monitoring system, which reads information and feeds it to the station monitor.

Would it be too vague or too broad to have the use case's primary actor to be 'System' ? Should I elaborate and specify which part of the system is that actor.


Solution

  • What is the purpose of a use case diagram ?

    A use-case diagram intends to show how a subject brings useful functionality in relation with its actors. Each use case is meant to have some value for the actors or other stakeholders of the system.
    According to the UML 2.5 specs:

    Each UseCase specifies some behavior that a subject can perform in collaboration with one or more Actors. UseCases define the offered Behaviors of the subject without reference to its internal structure.

    An Actor models a type of role played by an entity that interacts with the subjects of its associated UseCases (e.g., by exchanging signals and data). Actors may represent roles played by human users, external hardware, or other systems.

    So in principle, the system itself is not meant to be its own actor. The actor should correspond to a role that is expressed independently of the system. Please note that my wording does not exclude that the system fulfils this role itself.

    What does this mean for your self-interacting system ?

    Labeling the actor 'System' is therefore a very bad idea. The actor should correspond to a role that is expressed independently of the system. You could for example think of an actor: Supervision system (which could be another system, or the system itself):

    enter image description here

    Another possibility is to dig into the details:

    A subject of a UseCase could be a system or any other element that may have behavior, such as a Component or Class.

    So you could show the use-cases from the point of view of a subsystem, and for example have a subject Measurement Subsystem and an actor Monitoring Subsystem:

    enter image description here

    What do you really want to represent ?

    Introspective use cases can be the symptom of the wrong diagram choice.

    It is possible that you're less interested in how the system contributes to the goals of its users and how it relates with its external environment, but more in its internals. In this case, check if an activity, sequence or communication diagrams could not better suit your needs.