Jul 8th, 2008, 08:55 AM
Externally manipulating a flow
So the problem is that we have an spring MVC page and a web flow. If anything changes on the MVC page, which is not part of the flow, we want to tell the web flow to invalidate in some way - best case would be to tell it to change it's next action will be to enter into an end-state predefined to clean up and redirect the the original MVC page the webflow was launched from.
I've looked around a lot and read the docs for ExternalContextHolder, FlowExecutionListener, FlowExecutionContext... that last looked promising until I realized that everything it returned was immutable and only allowed for setting of attributes and such. I could use that and put decision states in front of every view state to query if a specific flow session attribute and if so, proceed to my redirecting-cleaning end state, but somehow that seems like a fairly invasive and not very elegant solution.
Does anyone have any good ideas/experiences/code they could share regarding externally changing a flow as I've described, or am I just plain nuts?
Tags for this Thread