Use Case Subject

A subject of a use case defines and represents boundaries of a business, software system, physical system or device, subsystem, component or even single class in relation to the requirements gathering and analysis.

In UML terms, subject is a classifier playing the "subject" role. They did not create a separate special class for subject, as it was done with actor and use case. UML 2.5 states that a subject of a UseCase could be a system or any other element that may have behavior, such as a Component or Class.". Classifier that may have owned behaviors is called behaviored classifier. Still, UML 2.5 abstract syntax shows subject as plain vanilla classifier.

A subject is a classifier (including subsystem, component, or even class) representing a business, software system, physical system or device under analysis, design, or consideration, having some behavior, and to which a set of use cases applies.

Subject is related to applicable use cases and is different from classifier owning use cases. In UML 2.x until 2.5 use case classifier was a classifier extended with the capability to own use cases. In UML 2.5 any classifier may own use cases.

Notation

Subject (sometimes called a system boundary) is presented by a rectangle with subject's name, associated keywords and stereotypes in the top left corner. Use cases applicable to the subject are located inside the rectangle and actors - outside of the system boundary.

Subject is presented by a rectangle with subject name in upper corner.

Books Online (subject) with applicable use cases and Web Customer actor.

Revisions

The requirement for the subject's name to be in the top left corner of the system boundary was added only in UML 2.5. Previous versions of UML allowed to use and had examples with the name in either one of top corners. Personally, I think it is too restrictive to use only the top left corner. When most of the actors are on the left side, subject's name looks better on the right side. In some cases I wouldn't mind having subject's name even in the top middle.

Business Model Subject

Use cases could be used to model some business to analyse business processes, recognize the problems being experienced, determine the opportunities to better serve customers.

Subject of use cases in this case is business, enterprise, company or its division, department, team.

Examples of business subjects:

UML provides no standard stereotypes to model business processes but we can use custom stereotypes like «Business» or «Department», if needed for clarity.

Example below shows «Business» Restaurant with business actors Customer, Advertiser and Supplier and related business use cases.

Restaurant business subject with business actors and applicable use cases.

Restaurant business subject with business actors and applicable use cases

Common Mistakes

Example below shows typical misconception for the «Business» Restaurant with business actors mistakenly including Waiter and Cashier. These are both working for the restaurant and are part of the business. They should not be shown as actors because actors are external users (customers) of the business (system).

Mistake: Restaurant business should not have Waiter and Cashier as actors.

Mistake: Restaurant business should not have Waiter and Cashier as actors

Software System Subject

System use cases describe a system that automates some business use case(s) or process. Subject in this case is software and/or hardware system, subsystem, component or device.

Examples of systems:

UML provides no standard stereotypes for subject (i.e. use case classifier) but UML 2.4 specification examples use the stereotypes from components:

Weather Service subject stereotyped as «Service».

Weather Service subject stereotyped as «Service».

Applicability of Use Cases

Use cases visually located inside the system boundaries are use cases applicable to the subject (but not necessarily owned by the subject).

Use cases located inside the system boundaries are applicable to the subject.

Use cases Browse Items and Buy Items are applicable to Retail Website subject

It is possible for some use cases to be applicable to multiple subjects.

Ownership of Use Cases

In UML 2.4 subject could own some or all of applicable use cases. This owning (nesting) of a use case is represented using the standard notation for nested classifier.

Use cases owned (nested) by a classifier (subject).

Retail Website subject owns use cases

Next  UML Actor