hekailiang / squirrel

squirrel-foundation is a State Machine library, which provided a lightweight, easy use, type safe and programmable state machine implementation for Java.
http://hekailiang.github.io/squirrel/
Other
2.19k stars 540 forks source link

support Pseudostate ? #88

Open huyinmiao opened 6 years ago

huyinmiao commented 6 years ago

like choice state, No need to use multiple transition can to reach different states。

hekailiang commented 6 years ago

https://github.com/hekailiang/squirrel/blob/master/EXAMPLES.md check Decision State Machine

huyinmiao commented 6 years ago

非常感谢提供的指导,这个有点复杂,定义了过多的事件,在实际业务流程中此处只有一个event(譬如一个按钮的点击),由context决定target state。

hekailiang commented 6 years ago

如果仅仅是通过context决定可以通过conditional transition实现

huyinmiao commented 6 years ago

谢谢