Recently, I looked at spring 2.3 webflow booking-faces demo, I found it strange that a different flow execution key is assigned every time I click to "browse" hotel detail.
When I search the hotels and page to the 5th page of the search result, I get an URL with execution=e1s2
. Then I click to browse a hotel detail, I get an URL with execution=e1s3
. But when I click the "back to search" button, I found the page is directed to the first page of the search list with an execution=e1s4
URL, and the paging state is missed. However, browsing step is defined in the same flow definition with hotel search act and paging var is defined within flow scope.
My question is whether a new execution key parameter means a new flow execution? What's the semantics? If so, How can I configure to stick into an identical flow execution when I click "back to search" button.
Thanks
Spring Web Flow provides a declarative flow definition language for authoring flows on a higher level of abstraction. It allows it to be integrated into a wide range of applications without any changes (to the flow programming model) including Spring MVC, JSF, and even Portlet web applications.
Class FlowExecutionKeyA key that uniquely identifies a flow execution in a managed FlowExecutionRepository . Serves as a flow execution's persistent identity. This class is abstract. The repository subsystem encapsulates the structure of concrete key implementations.
Spring's web module provides a wealth of unique web support features, including: Clear separation of roles - controller, validator, command object, form object, model object, DispatcherServlet, handler mapping, view resolver, etc. Each role can be fulfilled by a specialized object.
Configuring Web Flow in Spring. Spring Web Flow is built on a foundation of Spring MVC. That means all requests to a flow first go through Spring MVC's DispatcherServlet .
To be precise: the flow execution key (eg. "e1s2") indeed consists of two parts:
See also: https://docs.spring.io/spring-webflow/docs/current/api/org/springframework/webflow/execution/repository/support/CompositeFlowExecutionKey.html
Keep in mind that the flow execution key is not intended to be human readable or be interpreted by other software. This is essentially an internal webflow artifact.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With