System Modeling Essentials: UML Perspectives & Diagrams

What is System Modeling?

  • Process of creating abstract graphical models of a system.

  • Goal: Understand and communicate different views (perspectives).

  • Common Language: UML (Unified Modeling Language)


Four System Perspectives

PerspectiveDescription
ExternalModels the system environment or context
InteractionShows how system components or users interact
StructuralShows how the system or data is organized
BehavioralShows how the system behaves or reacts to events

Context Models

  • Show the operational context of a system.

  • Help define system boundaries:

    • What’s inside or outside the system.

    • Affects requirements and organizational politics.

  • Importance of Context Diagrams:

    1. Scope Definition

    2. Requirements Gathering

    3. Communication

    4. Risk Identification


Process Perspective

  • Goes beyond the environment view: shows how the system is used in business processes.

  • Uses Activity Diagrams (UML) to represent flow.


Activity Diagrams

  • Show control flow: sequential or concurrent activities.

  • Represent how actions are triggered.

  • Used to describe business logic or workflow.


Interaction Models

  • Help identify user/system requirements and performance issues.

  • Utilize:

    • Use Case Diagrams

    • Sequence Diagrams


Use Case Modeling

  • Use cases are tasks involving external interaction with the system.

  • Actors are people or systems interacting with the system.

  • Key Components:

    • Actor: Named by a noun

    • Use Case: Named by verb + noun (e.g., View Grades)

    • Communication Link: Solid line showing interaction

Relationships in Use Case Diagrams

RelationshipMeaning
IncludeOne use case includes another use case’s functionality
ExtendA use case can add behavior to another use case under specific conditions
GeneralizationOne use case is a specialized version of another

Example Use Case: Mentcare System Data Transfer

FieldDescription
ActorsMedical receptionist, patient records system
StimulusUser command
ResponsePRS updated confirmation
DataPersonal info, treatment summary
CommentsReceptionist needs permission

Sequence Diagrams

  • Part of UML: models interactions in time order.

  • Shows how actors and objects communicate.

  • Key Elements:

    • Lifeline (object timeline)

    • Messages (annotated arrows)

Steps to Create Sequence Diagrams

  1. Identify the use case.

  2. List participants.

  3. Define and arrange lifelines.

  4. Add messages and returns.

  5. Indicate order, timing, and add annotations.

Example: Emotion-Based Music Player Sequence

  • Captures user’s image → detects emotion → retrieves mood/music → displays playlist


Structural Models

  • Focus on a system’s components and their relationships.

  • Types of Structural Models:

    • Static (design-time structure)

    • Dynamic (run-time organization)


Class Diagrams

  • Used in Object-Oriented Design.

  • Key Elements:

    • Classes

    • Attributes

    • Methods

    • Relationships (association, aggregation, etc.)

  • Classes represent real-world concepts (e.g., Patient, Doctor).


Behavioral Models

  • Show how the system responds to events or data.

Two Main Stimuli Types:

  1. Data-driven (e.g., input triggers processing)

  2. Event-driven (e.g., external or internal triggers)


Data-Driven Modeling

  • Common in business systems.

  • Models sequence of actions based on input to output.

  • Used to show end-to-end processing.


Event-Driven Modeling

  • Common in real-time systems.

  • Models reactions to specific events.

  • Based on finite-state machines.


State Machine Models

  • Represent how a system transitions between states.

  • Used for real-time and control systems.