Spring状态机

系统教程 行业动态 更新时间:2024-06-14 17:01:31
Spring状态机 - 重用冲锋枪(Spring State machine - reuse Submachine)

我很难重新使用子机器图。

我需要重新使用一个状态机作为子机连接到一个状态,在另一个状态中作为子机。 但是当我给它引用时,我得到一个空指针异常。

参考图片

我已经添加了对GeneralTopup的冲洗机参考,我想将其添加到注册。 但似乎不可能。 这是吗?

I have difficulty in re-using a sub-machine diagram.

I have a need to Re-Use one State machine that I have linked to a state as a sub-machine, in another state as a sub-machine. But when I give the reference to it I get a null pointer exception.

Refer image

I Have added a submachine reference to GeneralTopup, I want to add the same to Register. But it seems impossible. Is this so?

最满意答案

这不会起作用,因为您需要在整个机器中具有唯一的状态,并且这会多次添加相同的状态。 话虽如此,这是一个长久以来我脑海中的想法,但我还不知道如何实现它。

This would not work as you need to have unique states in a whole machine and this would add same state multiple times. Having said that, it is a story what has been in my mind for a long time but I don't yet know how to implement it.

更多推荐

本文发布于:2023-04-20 16:23:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/fb21ecbd1615d984507383768905c1eb.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:状态机   Spring

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!