Dynamically force transition in Spring Web Flow

Spring web flow is a state machine of sorts for a user interacting with html pages. Traditionally, while a user is in a view state the system will wait until the user interacts with the page which will trigger some transition.

Is it possible to force a transition or update a page without interaction from the user in spring web flow? For example, I may have a REST controller, or an AMQP listener, or even maybe just some background process running. When data comes in from one of these independent processes, I'd like to update the user into a new transition.
For example the user is sitting at a decision point for a period of time and another service will call via REST into the web flow service to logout this user. The web page should suddenly navigate to a logged out screen.

The only way I've been able to achieve this is save the information and do a check for logout messages once input has been received but this is less than ideal.


You seem to be talking about a message sent asynchronously from the server to the client, like with Websockets.

Without a technology like that, I think your only options - unrelated to Web Flow itself - are:

  • JavaScript on the page timing out or polling
  • Wait for the user to submit their next request
  • 链接地址: http://www.djcxy.com/p/6664.html

    上一篇: 在breadcrumbs wordpress中的完整路径

    下一篇: Spring Web Flow中的动态强制转换