Communication Diagram

Emphasize structural links between collaborating objects alongside sequenced message numbering.

Open in Live Sandbox ↗
Sandbox ↗
1dialect uml;
2​
3uml::communication_diagram "Distributed Order Processing Mesh" {
4 schema {
5 actor @Buyer [label: "Customer"];
6 participant @WebStore [label: "Web Storefront Gateway"];
7 participant @OrderService [label: "Order Orchestrator"];
8 participant @PaymentService [label: "Payment Processor"];
9 participant @InventoryService [label: "Inventory Service"];
10 }
11​
12 flow {
13 Buyer <-> associates WebStore;
14 WebStore <-> associates OrderService;
15 OrderService <-> associates PaymentService;
16 OrderService <-> associates InventoryService;
17​
18 Buyer -[seq: "1"]-> WebStore: "placeOrder(cartPayload)" => cartToken;
19 WebStore -[seq: "1.1"]-> OrderService: "submitOrder(cartToken)" => orderId;
20 OrderService -[seq: "1.1.1a"]-> PaymentService: "authorizePayment(orderId)";
21 OrderService -[seq: "1.1.1b"]-> InventoryService: "reserveInventory(cartToken)";
22 OrderService -[seq: "1.2"]-> WebStore: "orderConfirmed(orderId)";
23 WebStore -[seq: "2"]-> Buyer: "displaySuccessNotice()";
24 }
25}
26​
Errors: 0 | communication-diagram
Read-Only Preview

Core Syntax Reference

ConstructPurpose
participant @Gateway;Declare collaborating object nodes
A -> B: "1: validate()";Annotated numbered message flow