Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: SWF 2.0 - Backtracking and exception catching

  1. #11
    Join Date
    Jun 2012
    Posts
    2

    Default

    I would love to have this feature developed. Voted in JIRA for tracker https://jira.springsource.org/browse/SWF-727

  2. #12
    Join Date
    Jun 2012
    Posts
    2

    Default

    That's smart! This can work for most purposes.

  3. #13

    Default

    Hi Keith!

    I'm using Spring Web Flow 2.3.0 and JSF 1.2.
    Double-clicking on any button or hyperlink and back-navigating lead to snapshot not found exception.
    In order to overcome it I edited max-execution-snapshots to -1 and made all the flow variables serializable and it worked.
    But serializing flow variables is not an easy task thanks to non-serializable data members.
    Could you please suggest how the exception handling method discussed here can be adopted as I'm using JSF.

  4. #14
    Join Date
    Dec 2012
    Location
    Denmark
    Posts
    2

    Default

    We were experimenting with something along the same lines

    Code:
    <transition on-exception="org.springframework.webflow.execution.repository.FlowExecutionRestorationFailureException" to="${flowScope.previousViewState}" />
    But it did not seem to work. Should this be possible in global transitions?

  5. #15
    Join Date
    Dec 2012
    Location
    Denmark
    Posts
    2

    Default

    In the end we managed to use the Spring MVC exception handling to handle the problem. It seems to have en advantage over the previously suggested solution in that it does not require any specific java class to work

    Code:
        <!-- Exception handling -->
        <bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
            <property name="defaultErrorView" value="error/exception" />
            <property name="defaultStatusCode" value="500" />
            <property name="warnLogCategory" value="WARN" />
            <property name="exceptionMappings">
                <props>
                    <prop key="org.springframework.webflow.execution.repository.FlowExecutionRestorationFailureException">error/backbutton</prop>
                </props>
            </property>
        </bean>
    on the backbutton page we present the user with an error message and a javascript-link that takes them back to the previous page.
    Last edited by Kent Damgaard; Jan 7th, 2013 at 05:28 AM. Reason: Fixed code tag.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •