Object Diagram
Capture concrete runtime snapshots of class instances, field slot values, and active object links at a specific point in execution.
| 1 | dialect uml; |
| 2 | |
| 3 | uml::object_diagram "E-Commerce Checkout Runtime State Snapshot" { |
| 4 | schema { |
| 5 | frame package @OrderAggregate [label: "Order Aggregate Boundary"] { |
| 6 | object @order101: Order [label: "Order #101", state: "CONFIRMED"] { |
| 7 | orderId: "ORD-98214"; |
| 8 | totalAmount: 249.50; |
| 9 | tax: 19.96; |
| 10 | currency: "EUR"; |
| 11 | itemCount: 2; |
| 12 | } |
| 13 | |
| 14 | object @itemA: OrderItem [label: "Item A"] { |
| 15 | sku: "SKU-AURORA-PRO"; |
| 16 | quantity: 2; |
| 17 | unitPrice: 74.75; |
| 18 | } |
| 19 | |
| 20 | object @itemB: OrderItem [label: "Item B"] { |
| 21 | sku: "SKU-CABLE-USB4"; |
| 22 | quantity: 1; |
| 23 | unitPrice: 100.00; |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | object @customerVIP: CustomerProfile [label: "VIP Customer Account"] { |
| 28 | userId: "USR-40291"; |
| 29 | loyaltyTier: "PLATINUM"; |
| 30 | lifetimePoints: 12500; |
| 31 | } |
| 32 | |
| 33 | object @paymentTxn: PaymentTransaction [label: "Captured Transaction"] { |
| 34 | txId: "TX-778811"; |
| 35 | provider: "STRIPE"; |
| 36 | status: "CAPTURED"; |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | flow { |
| 41 | customerVIP <-> order101: "places"; |
| 42 | order101 <-> itemA: "contains"; |
| 43 | order101 <-> itemB: "contains"; |
| 44 | order101 <-> paymentTxn: "settledBy"; |
| 45 | |
| 46 | note @OrderAuditNote [on: order101] "Verified against inventory reservations and 3DS payment token"; |
| 47 | } |
| 48 | } |
| 49 | |
Errors: 0 | object-diagram
Core Syntax Reference
| Construct | Purpose |
|---|---|
object @order1: Order { status = "PAID"; } | Declare typed runtime instance with slot values |
order1 -- customer1: "placedBy"; | Connect concrete object instances |