Spring State Machine timeout always execute when using connection factory

半世苍凉 提交于 2019-12-08 09:23:53

问题


This time I have a question about timeouts on the state machine. My scenario is like this, referring to the below image

On entering StateBasic, I perform some action and the machine given by the Factory waits at WaitForTemplateResult till one of the events either VAS_QRY_RES or MAIN_QRY_RES.

Now theres also a timeout which fires after 30seconds. So what happens now is the timeout is however fired even if VAS_QRY_RES or MAIN_QRY_RES comes.

I studied this problem and the explanation I was able to render is that when I first enter the StateBasic, the StateMachineFactory allocates a machine with a uuid, and when VAS_QRY_RES or MAIN_QRY_RES comes it allocates another machine which I confirmed was a different uuid. The Timeout of the previous machine fires anyway(with the 1st uuid).


回答1:


I'm hoping root cause of this was in gh321 for which I just pushed a fix. Would you mind try latest 1.2.3.BUILD-SNAPSHOT to see if it helps.



来源:https://stackoverflow.com/questions/42664368/spring-state-machine-timeout-always-execute-when-using-connection-factory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!