Spring Web Flow creates variables or objects under scopes. These scopes are just similar to JEE scope components, which determine the time frame of when to access these variables. Under Spring Web Flow, there are five scopes that can be mapped to a newly created object:
flowScope
: Assigns a flow variable; variables under this scope get allocated when a flow starts and destroyed when the flow ends.; any objects stored in flow scope need to be serializable:<evaluate expression= "addCartProducts.retrieveProductList (flowScope.cartProducts)" />
conversationScope
: Assigns aconversation
variable; variables under this scope are used whenever a top-level needs to generate objects to be accessed by its sub-flows; they are destroyed when the top-level flow ends; conversation scope must be serializable.viewScope
: Assigns aview
variable; these are variables that can only be referenced within the<view-state>
; these variables get allocated...