Announcement Announcement Module
No announcement yet.
webflow exception handling Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • webflow exception handling

    i'm pretty new to webflow and in fact spring mvc in general and was having trouble getting exception handling working in a flow. i can't seem to find good examples of this.

    basically what i want to do is pretty simple.. when a flow completes (end-state is reached) and the user presses the back button, i want to catch the nosuchflowexecution/nosuchconversation exception and display an error page. this doesn't seem to work:

    a bunch of view/action states

    <view-state id="error" view="error" />

    <end-state id="completed" view="externalRedirect:redirectURL" />

    <transition on-exception="org.springframework.webflow.execution.r epository.NoSuchFlowExecutionException" to="error" />
    <transition on-exception="org.springframework.webflow.conversatio n.NoSuchConversationException" to="error" />

    can someone show me a simple example of how to do this or point out what im doing wrong?

    Last edited by fadetoblack; Apr 5th, 2007, 12:28 PM.

  • #2
    This is one of those questions we definitely need a FAQ or tip for.

    Those exceptions you're trying to catch are thrown OUTSIDE the flow execution -- by the webflow system -- because access to a flow execution could not be granted (either because it ended, expired, or the definition didn't exist). The caller of SWF must catch these exceptions and route to an appropriate error page. Sam Brennan has submitted a patch to our JIRA system that provides Spring MVC exception resolver code that will do this handling for you. I'd definitely recommend checking that out.

    In 1.1 we will address this out-of-the-box.



    • #3
      thanks for the reply. i'm still confused about how to solve the problem though (again, im really new at spring & webflow). since the exception is thrown outside the flow how would i catch it when the back button is pressed? does the patch you mentioned allow you to do this? also, im not familiar with JIRA, could you please point me to the patch?



      • #4


        • #5
          great, thanks!