May 4th, 2009, 05:48 PM
Back button after flow ends results in HTTP Status 404
Transitions take a flow from page to page. When the flow ends and the last page is displayed, a back button operation results in a Http Status 404.
Instead of the Http Status display, I would like to redirect to a specific page. Is this doable?
Also there seems to be no exception being raised. If so, an alternative would be to catch the exception and redisplay the last page.
May 6th, 2009, 03:10 PM
Should be doable, though it's weird that you're getting a 404. The exception thrown should be a FlowExecutionRestorationFailureException.
May 7th, 2009, 06:00 AM
What version of SWF are you using? What FlowUrlHandler are you using? Since you are getting 404, I am suspecting that there is something wrong with the flow definition URL which is generated by the FlowUrlHandler as it tries to restart the ended flow. Put a breakpoint in DefaultFlowUrlHandler.createFlowDefinitionUrl( ) right before you press back.
Last edited by nkaza; May 8th, 2009 at 04:28 AM.
May 8th, 2009, 04:36 AM
If you are using FilenameFlowUrlHandler it might be a problem for which I have opened a Jira some time ago. I have fixed it by plugging in a custom implementation.
May 11th, 2009, 02:56 PM
Thanks InverseFalcon and nkaza for your interest/suggestions.
I have not specified a FlowUrlHandler, so the DefaultFlowUrlHandler is the handler that is effective. I was able to break at method createFlowExecutionUrl() for each transition that occurred. However, the backbutton after the end of the flow did not cause the breakpoint break - so backbutton execution path did not engage the FlowUrlHandler.
May 11th, 2009, 03:26 PM
If you are using the FlowController, FilenameFlowUrlHandler is used implicitely. Did you try a breakpoint there?
What URL can you see on the browser when 404 occurs?
Last edited by nkaza; May 11th, 2009 at 03:30 PM.
May 11th, 2009, 03:43 PM
As it turns out an exception is indeed being raised - NoSuchFlowExcecutionException. What needs to be done is to register a handler to catch this (and any other) exception and re-render the current page.
I do have a exception handler declared in the flow .xml. That handler is never invoked.
May 11th, 2009, 03:51 PM
Sorry, I lost you. You can see an exception on the browser? So there is no 404? NoSuchFlowExecutionException is by default caught by Spring web flow and by default it tries to restart the requested flow by calling createFlowDefinitionUrl( ). So you shouldn't be seeing a NoSuchFlowExecutionException on the screen in any case. Anyway, please provide some more information.
By the way, you mentioned you put the breakpoint in createFlowExecutionUrl. The correct method is createFlowDefinitonUrl.
Last edited by nkaza; May 11th, 2009 at 04:08 PM.
Reason: typo in exception name
May 11th, 2009, 03:58 PM
Wait, what version of SWF are you using? I don't think NoSuchFlowExcecutionException is a part of SWF 2.0.x, is it?
May 11th, 2009, 04:09 PM
NoSuchFlowExcecutionException is not. NoSuchFlowExecutionException is. Sorry about the typo.
Originally Posted by InverseFalcon
hmmm.. actually I copied the exception name from the previous post.