问题
I have this requirement for web-application wherein a user submits application for certain benefits by entering a set of his personal information. Every user application has an 'AppId'. So lets say a user with AppId 123 is within a flow and exits at a particular state. Next time when he logs in with AppId 123, he should be able to continue from where he left. How can we implement using Spring web-flow 2.3? Does SWF 2.3 has some sort of its own database like lets say a jBPM has?
回答1:
Spring Webflow isn't intended to be a workflow management or BPM system. It was designed to make it easier to work with and create complex wizard like forms. Instead of trying to shoehorn SWF into your requirements I would suggest using a proper BPM engine like Activiti for that purpose.
However if you really want to try and shoehorn SWF into your needs I would suggest starting to study the API of SWF. Which at some point will lead you to the ConversationManager
(by default a SessionBindingConversationManager
) which you could replace with your own custom implementation.
来源:https://stackoverflow.com/questions/21379010/storing-the-state-of-the-flow-in-spring-web-flow