0

I'm struggling to persist my state machine following the recipes and examples available. I'm working with the master branch and my state machine uses Hierarchical States, Regions and Orthogonal states. The first example I followed is spring-statemachine-samples/persist but it seems to deal only with basic FSM. The second one I tried is LocalStateMachineInterceptor but id does not seem to be working with Hierarchical States. Also, I can't find any way to persist an history state via a StateMachinePersist.

Is there an example of a complex FSM with persistence anywhere?

4

1 回答 1

0

老实说,当事情变得更加复杂时,对于示例和文档来说,持久性是一个相对未知的话题。这是我目前正在努力使它更容易的事情,因为作为用户你不应该关心,因为应该有一个相对干净的 API 来做这件事。所以请继续关注那些。

话虽如此,在我们更清楚地了解代码之前;

StateMachinePersist导致StateMachineContext测试中有一些代码,即StateMachineResetTests,它显示了一些方法来做这些事情。还有一个问题gh127,我在其中写了一些关于重置机器的内部机制,这就是持久性的作用。

历史状态,是的,这是我的错,由于某种原因,它已经从我的雷达中滑落了。感谢您指出!为它创建了一个问题gh182

于 2016-03-04T17:54:36.570 回答