flowchart LR
subgraph t1[" "]
direction TB
c1["cmd: Place Order"]
e1["OrderPlaced<br/><i>fact</i>"]
r1[("read: Order Status")]
c1 --> e1 --> r1
end
subgraph t2[" "]
direction TB
c2["cmd: Authorise Payment"]
e2["PaymentAuthorised<br/><i>fact</i>"]
r2[("read: Payment Ledger")]
c2 --> e2 --> r2
end
subgraph t3[" "]
direction TB
c3["policy: on PaymentAuthorised<br/>allocate stock"]
e3["StockAllocated<br/><i>fact</i>"]
r3[("read: Availability")]
c3 --> e3 --> r3
end
subgraph t4[" "]
direction TB
c4["policy: on StockAllocated<br/>request despatch"]
e4["ConsignmentCreated<br/><i>fact</i>"]
r4[("read: Tracking")]
c4 --> e4 --> r4
end
e1 --> c2
e2 --> c3
e3 --> c4
Behavioural View
Event Model
The business as a sequence of facts that happened, with the command that caused each and the read models and reactions it feeds.
Event-Driven Architecture
Design