Mastering UML Deployment and Activity Diagrams: A Practical Guide with B2C Examples
This article reviews UML modeling basics, then dives into deployment and activity diagrams—explaining their elements, relationships, and practical B2C system examples—to help readers understand how to represent component placement and dynamic behavior in software architecture.
1. Review of Previous Chapter
First, we recap the previous article, which introduced three UML diagram types: sequence diagram, component diagram, and state diagram.
2. Abstract
This article mainly explains UML activity diagrams and deployment diagrams.
3. Chapter Content
1) Review of the previous chapter. 2) Abstract. 3) Chapter content. 4) Abstract model diagrams: deployment diagram and activity diagram. 5) Chapter summary. 6) Series progress. 7) Preview of the next chapter.
4. Abstract Model Diagrams: Deployment Diagram, Activity Diagram
Deployment Diagram
A deployment diagram describes how a set of components are deployed onto nodes for execution, showing the system’s runtime structure and the configuration of software and hardware elements.
Basic elements of a deployment diagram:
Node – the environment where a component runs, which can be software (operating system, etc.) or hardware resources.
Node instance – distinguished by an underline and a colon; the name may be empty but the node must exist.
Component container – a node can contain other nodes or components.
Relationships between nodes, such as dependencies and communication.
Examples of relationships:
Unidirectional dependency: a query component accesses a SQL Server database via .NET ADO.NET.
Bidirectional dependency: a product management module writes to and reads from the database.
Communication: an application system and a database communicate through .NET.
Simple B2C system example:
Nodes include:
Browser – the sole entry point for users to access the B2C site.
Registration system – handles user registration and communicates with the database.
Member management – manages user profiles, shop information, addresses, purchases, and product listings.
Procurement system – handles buyer purchasing functions.
Publishing system – provides sellers with product publishing services and interacts with the database.
Payment system – processes payment transactions and communicates with personal accounts.
These examples illustrate how components are mapped onto nodes.
In summary, deployment diagrams are essential for visualizing how components are placed on nodes and how the system runs at runtime.
Activity Diagram
An activity diagram describes the dynamic behavior of a system, showing the flow from one activity to another. It is similar to a flowchart but differs in several key aspects.
Key elements:
Action state – represented by a rounded rectangle; it is atomic, indivisible, and always leads to another state after completion.
Activity state – depicted by two half‑circles combined with a rectangle; it can be decomposed into sub‑activities or sub‑action states and is non‑atomic.
Relationships between action nodes:
Control flow – arrows indicating transition direction, similar to state‑chart transitions.
Branch – a decision point that splits the flow into multiple paths.
Merge – converges multiple paths back into a single flow.
Swimlane – partitions the diagram into groups, each owned by a specific object or role.
Object flow – shows how objects are used or affected by actions, allowing objects to be inputs or outputs of actions.
Images illustrate each element and relationship.
Example: using a B2C e‑commerce scenario to model the product‑management workflow, showing how members must log in, become sellers, and then publish products.
5. Chapter Summary
The chapter covered deployment diagrams, which describe component placement on nodes, and activity diagrams, which model dynamic system behavior through a series of activity states and control flows.
6. Next Chapter Preview
The next article will introduce the remaining UML diagram types, analyze B2C system functional modules, and demonstrate how to select appropriate diagrams for functional analysis.
ITFLY8 Architecture Home
ITFLY8 Architecture Home - focused on architecture knowledge sharing and exchange, covering project management and product design. Includes large-scale distributed website architecture (high performance, high availability, caching, message queues...), design patterns, architecture patterns, big data, project management (SCRUM, PMP, Prince2), product design, and more.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
