I am new to Spring Webflow and I am going through the codes and explanation on internet. I have a basic doubt regarding the flow of execution of codes in spring webflow applications. As I have understood, A flow request is mapped to flow.xml file(I am now aware of FlowHandlerAdapter, FlowHandlerMapping, FlowRegistry). The starting state in the flow xml file, if it is a view-state, it renders a view. For example -
<?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">
<secured attributes="ROLE_USER" />
<input name="hotelId" required="true" />
<on-start>
<evaluate expression="bookingService.createBooking(hotelId, currentUser.name)" result="flowScope.booking" />
</on-start>
<view-state id="enterBookingDetails" model="booking">
<transition on="proceed" to="reviewBooking" />
<transition on="cancel" to="bookingCancelled" bind="false" />
</view-state>
<view-state id="reviewBooking">
<transition on="confirm" to="bookingConfirmed">
<evaluate expression="bookingService.persistBooking(booking)" />
</transition>
<transition on="revise" to="enterBookingDetails" />
<transition on="cancel" to="bookingCancelled" />
</view-state>
<end-state id="bookingConfirmed" />
<end-state id="bookingCancelled" />
</flow>
Here, when the flow file is being executed, the first view-state with id - "enterBookingDetails" renders the view enterBookingDetails.xhtml.
Does the control now go to the view page enterBookingDetails.xhtml and wait for the user event? And after the user clicks on button "proceed", the control comes back to flow XML file and executes the <transition> element to transit to reviewBooking view-state?
Am I understanding correctly that the flow execution is paused until a user event occurs, and upon occurrence of user event, control goes from web page to flow xml file and executes the transition and transits to corresponding state.