<!-- Creates a flow executor in Spring, responsible for creating and executing flows -->
<flow:flow-executor id="flowExecutor" flow-registry="flowRegistry">
<flow:flow-execution-listeners>
<flow:listener ref="jpaFlowExecutionListener" />
</flow:flow-execution-listeners>
</flow:flow-executor>
<!-- Listener for the JPA execution listener -->
<bean id="jpaFlowExecutionListener" class="org.springframework.webflow.persistence.Jpa FlowExecutionListener">
<constructor-arg ref="entityManagerFactory" />
<constructor-arg ref="transactionManager" />
</bean>
<!-- Load flow definitions and make them available to the flow executor -->
<flow:flow-registry id="flowRegistry">
<flow:flow-location id="process-flow" path="/process/flows/process-flow.xml" />
<flow:flow-location id="phase1-flow" path="/process/flows/phase1/phase1-flow.xml" />
</flow:flow-registry>
<!-- The FlowHandlerMapping helps DispatcherServlet to knowing that it should send flow requests to Spring Web Flow -->
<bean class="org.springframework.webflow.mvc.servlet.Flo wHandlerMapping">
<property name="flowRegistry" ref="flowRegistry" />
</bean>
<!-- The FlowHandlerAdapter is equivalent to a Spring MVC controller in that it handles requests coming in for a flow and processes those requests -->
<bean class="org.springframework.webflow.mvc.servlet.Flo wHandlerAdapter">
<property name="flowExecutor" ref="flowExecutor" />
</bean>