Spring Web Flow

Reference Documentation

Authors

Keith Donald, Erwin Vervaet, Ross Stoyanchev

Version 1.0.1


Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.

January 2007


Sponsors

Spring Web Flow would not be possible without the investment of its sponsors: Interface21 and Ervacon.

Table of Contents

Preface
1. Introduction
1.1. Overview
1.2. Architecture overview
1.3. Architectural layers
1.4. Layer descriptions
1.4.1. The Execution Core Layer (Bottom Layer)
1.4.2. The Execution Engine Layer
1.4.3. The Test Layer
1.4.4. The Executor Layer
1.4.5. The System Configuration Layer (Top Layer)
1.5. Support
2. Flow definition
2.1. Introduction
2.2. FlowDefinition
2.2.1. XML-based Flow template
2.2.2. Java Flow API example
2.3. StateDefinition
2.4. Transitionable State
2.4.1. XML-based state template
2.4.2. Java state API example
2.5. TransitionDefinition
2.5.1. Transition XML template
2.5.2. Transition Java API example
2.5.3. Action transition execution criteria
2.5.4. Dynamic transitions
2.5.5. Global transitions
2.5.5.1. Global transitions - XML example
2.5.6. Transition executing state exception handlers
2.5.6.1. Exception handling - XML example
2.6. Concrete state types
2.6.1. ViewState
2.6.1.1. ViewSelector
2.6.1.2. ViewState class diagram
2.6.1.3. ViewState XML - application view selection
2.6.1.4. ViewState API - application view selection
2.6.1.5. ViewState XML - flow execution redirect
2.6.1.6. ViewState API - flow execution redirect
2.6.1.7. ViewState XML - null view
2.6.1.8. FlowDefinitionRedirect and ExternalRedirect
2.6.1.9. ViewState XML - form state behavior
2.6.2. ActionState
2.6.2.1. Action execution points
2.6.2.2. Action attributes
2.6.2.3. ActionState class diagram
2.6.2.4. ActionState XML - simple action execution
2.6.2.5. ActionState API - standard action
2.6.2.6. ActionState XML - multi action
2.6.2.7. ActionState API - multi action
2.6.2.8. ActionState XML - bean action
2.6.2.9. ActionState XML - decision bean action
2.6.2.10. ActionState XML - decision bean action with enum return value
2.6.2.11. ActionState XML - evaluate action
2.6.2.12. ActionState XML - set action
2.6.2.13. When to use which kind of action?
2.6.3. DecisionState
2.6.3.1. DecisionState XML - expression evaluation
2.6.4. SubflowState
2.6.4.1. SubflowState XML - with input attribute
2.6.4.2. SubflowState API - input attributes
2.6.4.3. Flow input mapping - input contract
2.6.5. EndState
2.6.5.1. EndState result events
2.6.5.2. EndState Properties
2.6.5.3. EndState XML - redirect to flow after completion
2.6.5.4. EndState XML - redirect after flow completion
2.6.5.5. EndState XML - flow output attribute
2.6.5.6. EndState API - flow output attribute
2.6.5.7. SubflowState XML - mapping an output attribute
3. Flow execution
3.1. Introduction
3.2. FlowExecution
3.2.1. Flow execution creation
3.2.2. Flow execution startup
3.2.3. Flow execution resume
3.2.4. Flow execution lifecycle
3.2.5. Flow execution properties
3.2.6. Flow execution impl creation
3.3. Flow execution context
3.4. Flow execution scopes
3.5. Flow execution testing
3.5.1. Flow execution test example
3.5.2. Execution unit testing vs. full-blown system testing
4. Flow execution repositories
4.1. Introduction
4.2. Repository architecture overview
4.3. Flow execution identity
4.3.1. Conversation identifier
4.3.2. Continuation identifier
4.3.3. Flow execution key
4.4. Conversation ending
4.5. Flow execution repository implementations
4.5.1. Simple flow execution repository
4.5.2. Continuation flow execution repository
4.5.3. Client continuation flow execution repository
5. Flow executors
5.1. Introduction
5.2. FlowExecutor
5.2.1. FlowExecutorImpl
5.2.2. A typical flow executor configuration with Spring 2.0
5.2.3. A flow executor using a simple execution repository
5.2.4. A flow executor using a client-side continuation-based execution repository
5.2.5. A flow executor using a single key execution repository
5.2.6. A flow executor setting system execution attributes
5.2.7. A flow executor setting custom execution listeners
5.2.8. A Spring 1.2 compatible flow executor configuration
5.3. Spring MVC integration
5.3.1. A single flow controller executing all flows in a Servlet MVC environment
5.3.2. A single portlet flow controller executing a flow within a Portlet
5.4. Flow executor parameterization
5.4.1. Request parameter-based flow executor argument extraction
5.4.1.1. Launching a flow execution - parameter-style anchor
5.4.1.2. Launching a flow execution - form
5.4.1.3. Resuming a flow execution - anchor
5.4.1.4. Resuming a flow execution - form
5.4.1.5. Resuming a flow execution - multiple form buttons
5.4.1.6. Refreshing a flow execution
5.4.2. Request path based flow executor argument extraction
5.4.2.1. A flow controller with a request-path based argument extractor
5.4.2.2. Launching a flow execution - REST-style anchor
5.4.2.3. Resuming a flow execution - multiple form buttons
5.4.2.4. Refreshing a flow execution
5.5. Struts integration
5.5.1. A single flow action executing all flows
5.6. Java Server Faces (JSF) integration
5.6.1. A typical faces-config.xml file
5.6.2. Launching a flow execution - command link
5.6.3. Resuming a flow execution - form
6. Practical Use of Spring Web Flow
6.1. Sample applications
6.2. Running the Web Flow sample applications
6.2.1. Building from the Command Line
6.2.2. Importing Projects into Eclipse
6.2.3. Deploying projects inside Eclipse using Eclipse Web Tools (WTP)
6.2.4. Other IDE's
6.3. Fileupload Example
6.3.1. Overview
6.3.2. Web.xml
6.3.3. Spring MVC Context
6.3.4. Fileupload Web Flow
6.4. Birthdate Example
6.4.1. Overview
6.4.2. Web.xml
6.4.3. Struts Configuration
6.4.4. Birthdate Web Flow
6.4.5. Birthdate-alternate Web Flow