Spring Web Flows

Frequently Asked Questions
End-of-Life Notice
This FAQ covers the now defunct Ervacon Spring Web Flow system and not the official Spring Web Flow sub project of the Spring Framework.
We advice all users of Ervacon Spring Web Flow to migrate to the current release of Spring Web Flow. Visit the Spring Web Flow Portal for more information, download links and support options.

What is the Spring web flow system?
Why isn't Spring web flows using a full featured work flow engine?
How can I improve web flow stability when the browser Back button is used?
How can I access the state of the flow to do things like breadcrumbs?


What is the Spring web flow system?
The Spring web flow system is a controller implementation for the
Spring web MVC framework that captures the page flow in a web application in a simple XML definition, allowing you to split a large application into several parts. For an in depth look at web flows and the functionality they offer, read Spring Web Flows: A Practical Guide.

Why isn't Spring web flows using a full featured work flow engine?
It was a conscious decision to implement a simple flow engine aimed at page flows instead of using a powerful and complex general purpose work flow engine, like
OSWorkflow or jBPM. The Spring web flow system aims to be a simple system that does one thing right: page flow in a Spring based web application. As a result it doesn't provide more advanced workflow concepts like forks and joins. The web flow XML definition syntax also aims to be as simple as possible and avoids features that could lead to inappropriate use, like programming in XML.

How can I improve web flow stability when the browser Back button is used?
Browser Back button use and how to deal with it is discussed in detail in the note
Spring Web Flows: Back Button Handling.

How can I access the state of the flow to do things like breadcrumbs?
The state of a web flow (and of its parent and sub flows) is kept in a
WebFlowMementoStack object, which is stored in the HTTP session. To make this available to a view, you will need to put it in the flow model or request using an action like this:

public class MyAction implements Action {
	public String execute(HttpServletRequest request, HttpServletResponse response, Map model) {
		WebFlowMementoStack mementos=WebFlowUtils.getWebFlowMementoStack(request, model);
		model.put("mementos", mementos.asList());
	}
}

Note the asList() call, which will make the mementos available as a list, easing processing in the view. If you're using JSP as view technology you can also directly get the mementos stack from the HTTP session, preferably using some helper class. That way you no longer need an action to expose the information to the view.

© Copyright Ervacon 2008. All Rights Reserved. Contact us.
All trademarks and copyrights on this page are owned by their respective owners.