Visit our blog
News & Events
Spring Web Flow 1.0 RC1 Released
Dear Spring Community,
We are very pleased to announce that Spring Web Flow (SWF) 1.0 RC1 (Release Candidate 1) has been released. Download it.
After over a year of hard development work, 29,000 downloads, 3,700 posts by 500 forum users, one book, and numerous community-driven articles, this release delivers the first 1.0 release candidate of Spring Web Flow. Considered fit for production use, this release solidifies the 1.0 API which will remain backward compatible throughout the entire 1.x series.
To the Spring Web Flow early adopters and champions who have supported our product, thank you. Spring Web Flow delivers one of the most innovative and powerful controller engines available today thanks to your feedback and support.
The Spring Web Flow team expects one more release candidate before 1.0 final. The new and noteworthy in 1.0 RC1 include...
NEW AND NOTEWORTHY
Improved support for managing stateful business components. Spring Web Flow now employs several techniques for managing instances of stateful middle-tier components that execute business logic as part of a task execution. In most cases, state management is completely transparent. You simply store your application state in instance variables and Spring Web Flow handles scoping that state within a conversation in a thread safe manner.
This support is illustrated by the simple NumberGuess sample application, where a "Game" component managed by the flow carries out the execution of game business logic. The component itself has zero dependencies on Spring Web Flow APIs.
To demonstrate, the business interface of the Game component could be defined as:
The flow definition to carry out execution of a Game with a user could look like:
Lastly, the binding between the logical game action identifier and a Game implementation is made by Spring within game-beans.xml.
The HigherLowerGame implementation is also completely decoupled from Spring and Spring Web Flow APIs.
Enhanced support for flow variables, created automatically when a flow starts. Flow variable values may even be sourced from a backing bean factory, benefiting from full dependeny injection there. The exact scope of the variable is configurable.
A new flow execution redirect response type, for redirecting to a unique "flow execution URL". Accessing a flow execution URL refreshes a Flow at a previously entered ViewState, allowing continuation from there. The URL remains valid while the conversation is active and the continuation point remains valid. This allows for full use of back, next, refresh, and new window buttons without page caching.
Refinements in state exception handling, with convenient support for transition-executing state exception handlers. The core transition element now supports a on-exception attribute that drives a transition to a new state on the occurrence of an exception. For example:
... transitions the flow to the editAccount state if an AccountException is thrown by the placeOrder method.
Improvements in flow attribute mapping support. Each flow may now be configured with an input-mapper to map input provided by callers that start the flow. A flow may also be configured with an output-mapper to expose return values to callers who terminate the flow. These enhancements allow a flow to be reused as a top-level flow and a subflow without change, as input and output attributes are mapped consistently for both cases.
Support for dynamic view name and target state expressions, allowing for convenient runtime-based calculation of ViewState's logical view name, and a transition's target state, respectively.
Enhanced JSF integration. The JSF integration now supports the logical redirect response types including FlowExecutionRedirect, ConversationRedirect, FlowRedirect, and ExternalRedirect. In addition, enhancements to the FlowPhaseListener allow for a flow execution to be launched and refreshed without having to go through a formal navigation step. 1.0 RC2 is expected to add further JSF convenience and official support with JSF in a Portlet environment.
ADDITIONAL RESOURCES and WHERE TO START
One of the best ways to get started with Spring Web Flow is to review and walkthrough the sample applications. We recommend reviewing all samples, supplementing with reference manual material as needed from the start. Nine (9) sample applications ship with the 1.0 RC1 release, each demonstrating a distinct set of product features. These samples are:
1. Phonebook - the original sample demonstrating most features (including subflows).
To build the sample applications for deployment in one step simply extract the release archive, access the projects/build-spring-webflow directory and execute the ant dist target. See the release readme.txt and projects/spring-webflow-samples/readme.txt for more information on the release archive contents and samples, respectively. All sample projects are now Spring IDE projects, directly importable into Eclipse. Watch for the Spring IDE Graphical Web Flow editor coming soon from the Spring IDE team.
Thanks to everyone out there who has made Spring Web Flow what it is today—those using it, providing the feedback that makes it stronger. Enjoy!
The Spring Web Flow Team
Our monthly newsletter is packed full of techniques, tutorials, tips and tricks to get you on your way to Spring nirvana. View Archive