“Create an event storming diagram for a product return: Request return causes Return requested; an eligibility policy causes Return approved; issue return label causes Return label issued; receive returned item causes Item received; and a refund policy causes Refund issued. Color commands blue, events orange, and policies green.”
看懂背後的決策。
Agree on the policy for approving returns.
Record label issuance and item receipt separately.
Set the event that authorizes a refund.
Use for a return process with clear policy and warehouse handoff points.
常見問題
Why is return eligibility a policy?
It reacts to a return request using business rules to decide what happens next.
Should a refund happen before receipt?
That depends on policy; this example issues it after the returned item is received.
What is an aggregate here?
A return or order aggregate can own the state changes represented by these events.