Compartiendo objetos a través de pantallas, usando Spring Webflow

Estoy tratando de configurar algo que se verá como un proceso de pantalla múltiple de configuración de una reserva, por ejemplo.

Pantalla 1 Añadir información personalPantalla 2 Información de contactoPantalla 3 Resumen y confirmación.

He configurado mi flujo web .jsp y xml y todas las clases, pero tengo problemas para vincularlas. Quiero crear una clase de cuenta al principio del flujo. Cuando se completa la primera pantalla, la información se almacena en esa clase. Cuando en la pantalla final el usuario puede ver el resumen en función de la información que proporcionó y revisar si es necesario, cuando vuelva a la primera pantalla, la información ya se habrá completado para que no tenga que volver a ingresar.

Lo siento por la pared de código. Traté de minimizarlo en los lugares posibles para un error que pudiera imaginar.

Mi flow-config.xml

<?xml version="1.0" encoding="UTF-8"?>
<flow xmlns="http://www.springframework.org/schema/webflow"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/webflow
    http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">

    <on-start>
        <evaluate expression="BookingManagementService.createBooking()" result="flowScope.booking" />
    </on-start>

    <view-state id="flow-config"  view="booking/BookingIdentificationScreen" model="booking">
    <binder>
        <binding property="username" />
    </binder>
    <transition on="next" to="enterContactDetails"/>
    <transition on="cancel" to="cancel"/>
</view-state>
    ... 
</flow>

Mi general servlet-context.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:beans="http://www.springframework.org/schema/beans"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:webflow="http://www.springframework.org/schema/webflow-config"
    xsi:schemaLocation="http://www.springframework.org/schema/mvc 
        http://www.springframework.org/schema/mvc/spring-mvc.xsd
        http://www.springframework.org/schema/beans 
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context 
        http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/webflow-config
        http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd">

    <annotation-driven />

    <resources mapping="/resources/**" location="/resources/" />

    <beans:bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <beans:property name="prefix" value="/WEB-INF/views/" />
        <beans:property name="suffix" value=".jsp" />
    </beans:bean>

    <context:component-scan base-package="com.mycompany.myapp" />

    <beans:bean id="handlerMapping" class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping" />
    <beans:bean name="/index.do" class="com.mycompany.myapp.IndexController" />
    <beans:bean name="/home.do" class="com.mycompany.myapp.HomeController" />

    <beans:bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
        <beans:property name="mappings" value="/account/flow-config.do=flowController" />
        <beans:property name="alwaysUseFullPath" value="true"/>
    </beans:bean>

    <!-- SPRING WEB FLOW STUFF -->
    <beans:bean id="flowController" class="org.springframework.webflow.mvc.servlet.FlowController">
        <beans:property name="flowExecutor" ref="flowExecutor"/>
    </beans:bean>

    <webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry"/>

    <webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices">
        <webflow:flow-location path="/WEB-INF/config/flow-config.xml"/>
    </webflow:flow-registry>

    <webflow:flow-builder-services id="flowBuilderServices" view-factory-creator="viewFactoryCreator"/>

    <beans:bean id="viewFactoryCreator" class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator">
        <beans:property name="viewResolvers">
            <beans:list>
                <beans:ref bean="viewResolver"/>
            </beans:list>
        </beans:property>
    </beans:bean>

</beans:beans>

BookingManagementService.java

@Service("bookingService")
public class BookingManagementService{
    @Transactional(readOnly = true)
    public BookingIpl createBooking(Long hotelId, String username) {
        BookingIpl booking= new BookingIpl();
        return booking;
    }
}

BookingIpl.java

@Entity
public class BookingIpl implements Serializable {
    public String username;
    ...
}

IndexController

   @Controller
   public class IndexController extends AbstractController {
    private BookingManagementService bookingService;

    @Autowired
    public IndexController(BookingManagementService bookingService) {
        this.bookingService = bookingService;
    }
    @Override
    protected ModelAndView handleRequestInternal(HttpServletRequest arg0,
            HttpServletResponse arg1) throws Exception {
        return new ModelAndView("index");
    }
}

así que en mis scripts de java para la primera pantalla tendría algo como:

<form:form modelAttribute="booking" action="${flowExecutionUrl}" method="post">
     <form:input type="text" path="username"/>
</form:form>

y después de la solicitud a la siguiente pantalla, deseo devolver el valor en un resumen, por ejemplo

 <form:form modelAttribute="booking" action="${flowExecutionUrl}" method="post">
         <spring:bind path="username">${status.value}</spring:bind>
    </form:form>

El error que estoy recibiendo está en la línea de:

SEVERE: Servlet.service() for servlet [appServlet] in context with path [/myapp] threw exception [Request processing failed; nested exception is org.springframework.webflow.execution.ActionExecutionException: Exception thrown executing [AnnotatedAction@778e65f2 targetAction = [EvaluateAction@25c73030 expression = bookingService.createBooking(), resultExpression = flowScope.booking], attributes = map[[empty]]] in state 'null' of flow 'flow-config' -- action execution attributes were 'map[[empty]]'] with root cause
org.springframework.expression.spel.SpelEvaluationException: EL1008E:(pos 0): Field or property 'bookingService' cannot be found on object of type 'org.springframework.webflow.engine.impl.RequestControlContextImpl'

Probé otro método para hacer todo esto, que es la definición de un bean en mi servlet así:

<beans:bean id="bookingBean" class="com.mycompany.myapp.BookingIpl" scope="prototype" />

Pero esto tampoco ayudó, dio el mismo error.

Soy muy nuevo en web-flow y spring, así que perdóneme si el error que cometí fue algo obvio.

Gracias

Respuestas a la pregunta(2)

Su respuesta a la pregunta