知识卡片
命令连接决策与事实
事件描述已经发生的事实;命令用祈使语气描述触发事件的操作,放在事件之前。人为命令标角色,并在命令之前放读模型,说明角色依据什么信息决策。自动命令则用策略连接前置事件与命令,必要时写明条件;外部系统也可执行命令或接收事件。最终每个命令应有明确触发来源。
结构图:
flowchart LR
R[读模型] --> A[角色决策]
A --> C[命令]
E[前置事件] --> P[条件策略]
P --> C
X[外部系统] --> C
C --> F[新事件]
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 事件风暴 · 查看原书依据
Whereas a domain event describes something that has already happened, a command describes what triggered the event or flow of events. Commands describe the system’s operations and, contrary to domain events, are formulated in the imperative. For example: Publish campaign Roll back transaction Submit order Commands are written on light blue sticky notes and placed
参考来源
- 位置:《Learning Domain-Driven Design》第12章《事件风暴》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Learning Domain-Driven Design/_epub-src/OEBPS/ch12.html)
- 结论依据:原文步骤5至8补全命令、角色、策略、读模型和外部系统的因果与信息关系。
- 原始内容:Whereas a domain event describes something that has already happened, a command describes what triggered the event or flow of events. Commands describe the system’s operations and, contrary to domain events, are formulated in the imperative. For example: Publish campaign Roll back transaction Submit order Commands are written on light blue sticky notes and placed