최근 UML 이라는 것을 접하게 되어 이 중 Use Case Diagram에 대해 간단히 내용을 정리해놓고자 한다.
거의 모든 출처는 uml-diagrgams.org 이다.
1. UML
UML이란 Unified Modeling Language의 약자로, 통합 모델링 언어라는 뜻이다. 이는 소프트웨어 공학에서 사용되는 표준화된 범용 모델링 언어이다. 위키피디아에 따르면, "통합 모델링 언어는객체 지향 프로그래밍소프트웨어 집약 시스템을 개발할 때 산출물을 명세화, 시각화, 문서화할 때 사용한다."고 한다.
2. Use Case Diagram
말 그대로 실제 사용 사례를 도식화 한 것으로, 시스템과 실제 사용자의 관계를 표현한 것이다. Use Case Diagram은 일반적으로 시스템(주체)이 한 명 이상의 시스템의 외부 사용자(액터)와 협력하여 수행해야 하거나 수행 할 수있는 일련의 작업 (사용 사례)을 설명하는 데 사용되는 동작 다이어그램이다. 각 Use Case는 시스템의 행위자 또는 기타 이해 관계자에게 관찰 가능하고 가치있는 결과를 제공해야 한다.
3. Use case Diagram 기호 및 표기법
전체적인 구성도는 아래 그림과 같으며, 각각의 기호에 대해서는 아래에 추가로 설명한다.
3.1. System boundary boxes(Scope)
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.
모양 : 사각형 (rectangle with subject's name, associated keywords and stereotypes in the top left corner.)
설명 : 시스템이 제공하는 기능의 범위
3.2. Use Cases
Use cases allow to capture requirements of systems under design or consideration, describe functionality provided by those systems, and determine the requirements the systems pose on their environment.
모양 : 타원 (ellipse containing the name of the use case.)
설명 : 사용자가 할 수 있는 다양한 용도, 시스템의 요구사항을 나타낸다.
3. Actors
An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject (e.g., by exchanging signals and data), a human user of the designed system, some other system or hardware using services of the subject.
모양 : Stick man
설명 : represent the people actually employing the use cases.
3.1. Primary Actor(주 행위자)
시스템에서 서비스 중 하나를 제공하도록 요청하는 이해관계자
3.2. Supporting Actors (보조 행위자)
a user who provides a service (e.g., information) to the system.
4. Associations, Include, Extend
4.1. Association
Each use case represents a unit of useful functionality that subjects provide to actors. An association between an actor and a use case indicates that the actor and the use case somehow interact or communicate with each other.
Actor와 Use Case간 커뮤니케이션 또는 상호작용함을 나타낸다.
(※ Only binary associations are allowed between actors and use cases.)
4.2. Include (포함관계)
Use case include is a directed relationship between two use cases which is used to show that behavior of the included use case (the addition) is inserted into the behavior of the including (the base) use case.
Include된 Use Case는 Addition Use Case로써 이를 호출한 Use Case에 기능을 확장한다.
Include된 사례는 선택이 아닌 필수이다.
- 예시 : Bank ATM Transaction을 위해서는 Customer Authentication이 필수이다
4.3. Extend (확장관계)
Extend is a directed relationship that specifies how and when the behavior defined in usually supplementary (optional) extending use case can be inserted into the behavior defined in the extended use case.
기본 동작에 추가로 보충할 수 있는 확장적 Use Case로 선택이다.
- 예시 : Registration 시 Get Help On Registration 기능 수행