Reputation: 613
I am trying to get my head around Spring Web Flow 2...
Am I correct in saying that a web flow operates entirely through a single url (but with different execution parameters?
Eg.
http://mydomain.com/flowname.html
http://mydomain.com/flowname.html?execution=e1s1
All the examples I have seen, seem to do just that.
Am I correct in saying that if you leave the flow (by going to a page outside of the flow's control), when you return to the flow, the actual flow is a new instance and the contents from the earlier flow are lost?
I am trying to incorporate Web Flow 2 into an existing ecommerce site and having problems...
Upvotes: 3
Views: 4107
Reputation: 1521
A flow is mapped to a URL. When you visit this URL for the first time, a new flow execution is created and a new key assigned:
Once a flow execution is created Webflow assigns it a flow execution key. This is the execution parameter you see:
http://www.mydomain.com/flow?execution=e1s1
To answer your question about returning to the flow: If you return using the URL without the execution key, you will get a new flow execution. But if you include the execution key you will be taken to the state and flow execution that is encoded in the key. e1 indicates the flow execution, and s1 indicates the state. Note that depending on how your flow is setup, you may or may not be able to return to certain states by specifying it on the execution key.
Also note, by default flow execution snapshots are stored in HttpSession. If this session times out you would not be able to return to that flow.
Upvotes: 3