Spring provides another sophisticate support named Spring Web Flow (SWF) though it has Spring MVC. Spring MVC provides higher level of functionality by AbstractFormController and its extended class SimpleFormController, used world wise for general purpose. These are excellent but when we have to deal with a flow of work, Spring MVC is not the best choice to do so. A simple XML or Java file is used to describe flow of pages and task, help to reuse the code in multiple situation also used to define user interface flow of web application but not forced to use any specialized controller.
A web Flow is generally collection of states. State defines a moment where something happen. In a state, like a flow chart you can define next choice by defining transition. For example in a C code we say
if (x>0) {
printf(“Profit”);
} else {
printf(“Lose”);
}
In the same way in SWF you can define
<action-state id=”decisionOnX”>
<action name=”xAct” bean=”decision”/>
<transition name=”xAct.pos” to=”profit”/>
<transition name=”xAct.neg” to=”lose”/>
</action-state>
Not only it provides such sort of specialized feature but also allow to feature of Spring MVC with it in totally separate domain.
by: Md. Shahjalal
Posted by Md. Shahjalal 
