Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们刚刚开始一个新项目。启动该项目的人并不知道它是一个状态机应用程序。在查看了这些状态之后,我想知道事件失败会发生什么。以他的在线购物应用程序状态机示例为例,如果交付事件或收到付款事件失败怎么办?放弃、失败或重试是状态的一部分吗?
当一个事件没有发生时,无论是失败还是其他,什么都没有发生。 为了检测和处理这个问题,可以引入超时来创建状态转换,然后可以反过来作为纠正措施(重试等)。