<p>Spring Web Flow (SWF) 1.0 EA, the proposal for what will become Spring 1.0 final, has been released.

Among other new features, this release showcases integration of Spring Web Flow with Ajax technology. Specifically, the “Shipping Rate” sample application included in the release distribution illustrates how to use the Prototype JavaScript library to embed a flow within a zone of a page.

The sample flow is a wizard that makes Ajax calls to the server to complete processing. This wizard takes the details about a package shipment over several steps and on completion calls a backend service to calculate the shipping rate:

- Using a JavaScript component to submit regular forms through an AJAX request, and inserting the HTML received from the server into a DIV tag.
- Submitting the _flowId request parameter to tell the flow controller which flow needs to be launched:

- Submitting the _flowExecutionKey and _eventId parameters to resume a launched flow to tell it what happened in the current state of the conversation:

In summary, with Spring Web Flow 1.0 EA and onward it is possible to launch, participate in, and query ongoing conversations that represent discrete, stateful, portable user interactions with the server using Ajaxian techniques. Expect additional patterns, best practices, and examples to emerge to further showcase this integration in the near feature; contributions and feedback in this area are welcomed and encouraged.

Additional Information

Spring Web Flow is a product of the Spring community focused on the definition and execution of page flow within a web application.

The system allows you to capture logical page flows as self-contained controller modules that are reusable in different situations. The system is ideal for web applications that guide users through controlled interactions that drive business processes. These user interactions, or conversations, typically span HTTP requests and may be dynamic and transactional in nature.