|
Visit our blog
News & EventsSpring Web Flow 1.0 EA ReleasedDear Spring Community, We are pleased to announce that Spring Web Flow (SWF) 1.0 EA (Early Access) has been released. Download it. This release is the proposal to the community for what will become Spring Web Flow 1.0 final. The release is considered feature complete for the SWF 1.0 roadmap. With this release we begin a four week evaluation period at the end of which 1.0 RC1 will be released, followed by 1.0 final. This EA evaluation period is capped at four (4) weeks; its purpose is to allow a final period of feedback to help further ensure the highest quality product possible before we fully lock down the API at 1.0 RC1. We very much value your feedback at this time, as there are a substantial number of new features available in the product with this release to take advantage of. The new and noteworthy include... NEW AND NOTEWORTHY Support for binding directly to backing business services from a flow definition. This eliminates the need to code custom Action adapter classes in many cases. What you are left with is what matters: your flow definition and your service-layer. In most cases you don’t depend on SWF APIs at all. Example:
Binds to: public interface Phonebook {
<decision-state id="shippingRequired"> Binds to: public interface ShippingService { Support for four (4) distinct flow response types out-of-the box. From a ViewState or an EndState it is now possible to request:
What is interesting about this is the above are logical response types. The actual response issued may vary based on the environment in which the flow is executing (Servlet vs. Portlet, for example)—because of this separation, these environmental differences do not affect your flow definition in any way (making the flow definitions simpler and reusable across environments).
Multiple strategies for launching flows and accessing/refreshing/bookmarking ongoing conversations. This includes:
Simplified support for deploying flow definitions for execution. The FlowRegistry infrastructure makes it possible to deploy a set of flow definitions as a group, where all flows in that group are eligible for execution by a single controller. Support for wildcard-matching on externalized flow definition resources is also provided: <bean name="/app.htm" class="org.springframework.webflow.executor.mvc.FlowController"> Spring Portlet MVC integration, for executing flows in a JSR 168 Portlet environment. The Phonebook-portlet demonstrates this integration, configured for use out-of-the-box on Apache Pluto. Note how the flow definitions between the servlet and portlet version of Phonebook are identical, fully reusable across environments The Portlet integration requires Spring 2.0 M2 or >.
JSF integration, for executing flows in a JSF environment. The sellitem-jsf sample demonstrates. The JSF integration requires Spring 1.2.7. Note how the flow definition between the Spring MVC and JSF versions of sellitem are nearly identical (JSF components handle data binding and validation, so the sellitem-jsf version is slightly more concise). Improved support for persisting flow executions across requests and tracking ongoing conversations within a repository. The backing repository strategy is pluggable; use of continuation-based repository allows capturing the state of a conversation at each view state to support restoring from history when using the back button. Tracking logical conversations allows detection of conversation completion to prevent the possibility of duplicate submit out-of-the-box (with no custom coding required), and allows for conversation scope, a data map shared by all conversation continuations. Automatic externalized flow definition change detection and “hot reloading”. Analogous to a JSP resource, a flow definition resource that changes is refreshable on the fly without container restart. Support for global transitions shared by all states of a flow. This is particularly useful for view-states that logically share a common-set of navigation actions. Example:
Support for importing one or more Spring bean definition files into a flow definition, providing a context for configuring custom flow artifacts such as actions, attribute mappers, exception handlers, view selectors, and transition criteria. Example: <view-state id="enterSearchCriteria" view="searchCriteria"> Support for “inline-flows”, flow definitions fully local and contained within an outer flow definition: <flow start-state="displayItemlist"> Support for exception handling at both the flow and state level. A flow can now be configured to take a response action on the occurrence of an exception. Example: <action-state id="executeSearch"> Misc improvements in many areas including but not limited to Java-based flow building, flow execution testing, flow execution listening, conversation locking, flow execution serialization, attribute and parameter map access support, flow attribute mapping, and piecemeal page-level form validation. In general we consider the public SWF API mature and complete; at the same time, an interesting fact about using SWF is you typically rarely depend on that API in application code.
ADDITIONAL RESOURCES and WHERE TO START Spring Web Flow 1.0 EA introduces the first version of the reference manual, providing 50 focused pages on SWF usage. The manual is available on-line in HTML and PDF forms. 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 EA release, each demonstrating a distinct set of product features. These samples are: 1. Phonebook - the central 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, 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. 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. Special thanks to Ulrik Sandberg for his contribution to our test suite. 1.0 final is just on the horizon—we keenly look forward to your feedback on this release. Sincerely, The Spring Web Flow Team Keith Donald |
Upcoming Training04/15 - 04/18:
Bangalore Rich Web Applications with Spring Enterprise Integration with Spring 04/16 - 04/19:
Wien Plus: Hibernate with Spring, Core Spring.NET, Groovy & Grails Newsletter SubscriptionOur monthly newsletter is packed full of techniques, tutorials, tips and tricks to get you on your way to Spring nirvana. View Archive |






Comments
Integrating Spring Webflow into a large Struts app
I have a large Struts app with many Action classes. I read the statement:
'Support for binding directly to backing business services from a flow definition. This eliminates the need to code custom Action adapter classes in many cases. What you are left with is what matters: your flow definition and your service-layer. In most cases you don’t depend on SWF APIs at all. '
Does this mean I can use my existing actions somehow? How can I call a regular action with a method signature like
public ActionForward execute(final ActionMapping mapping, final ActionForm form,final HttpServletRequest request, final HttpServletResponse response)
from Spring Webflow? The app is too large to rewrite in order to add Spring Webflow. I'm hoping that I can add it to my existing app. Will this work?