(Quick Reference)
webflow
Purpose
The
webflow
plugin configures Grails' support for
Spring WebflowExamples
An example web flow:
class BookController {
…
def shoppingCartFlow() {
showCart {
on("checkout").to "enterPersonalDetails"
on("continueShopping").to "displayCatalogue"
}
…
displayCatalogue {
redirect(controller:"catalogue", action:"show")
}
displayInvoice()
}
}
Description
Refer to the section on
Web Flow in the Grails user guide which details Grails' web flow support.
Configured Spring Beans:
conversationManager
- An instance of the SessionBindingConversationManager interface that manages conversations in the session.
executionListenerLoader
- A Web Flow StaticFlowExecutionListenerLoader that uses the hibernateConversationListener
bean with flow execution events to manage the Hibernate session.
flowBuilderServices
- An instance of the FlowBuilderServices class used to help the Flow engine locate services.
flowExecutor
- An instance of the GrailsFlowExecutorImpl that knows how to execute Grails flows based on flow execution keys.
flowExecutionFactory
- An instance of the FlowExecutionImplFactory that constructs flow executions.
flowExecutionSnapshotFactory
- An instance of the SerializedFlowExecutionSnapshotFactory class that is used to create flow snapshots that can be stored for resumption later on.
flowExecutionRepository
- An instance of the DefaultFlowExecutionRepository class that is used to store flows.
flowRegistry
- An instance of the ControllerFlowRegistry class that stores persisted flows.
flowScopeRegistrar
- An instance of the Spring Web Flow ScopeRegistrar class which registers the flow scopes with the ApplicationContext
so that services can be scoped using flow scopes such as flow
, conversation
and flash
.
hibernateConversationListener
- An instance of the Web Flow SessionAwareHibernateFlowExecutionListener:https://grails.github.io/grails2-doc/latest/api/org/codehaus/groovy/grails/webflow/persistence/SessionAwareHibernateFlowExecutionListener.html class that manages the Hibernate session for the scope of a flow, allowing atomic use of flows.
viewFactoryCreator
- An instance of the MvcViewFactoryCreator class used to construct views