Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Facing strange issue with Spring Webflow 2

  1. #1
    Join Date
    Jun 2009
    Posts
    6

    Question Facing strange issue with Spring Webflow 2

    Hi,
    I am facing a strange issue with the Spring webflow2 where if we keep a page open for some time (let's say 10 minutes) and then try to submit the page after entering some data to the fields, then page gets blanked out having all the data entered previously as wiped out.

    When i debug it , i found that the form bean has all the properties as null when it comes to my custom controller.

    Then again if i enter the data and submit it immediately it successfully submits the data, rech to the my custom controller class with all the form properties populated correctly.

    We are fetching this bean from flow scope.

    Anybody has any idea about it?

  2. #2
    Join Date
    Nov 2008
    Posts
    742

    Default

    What's your session timeout set to?

  3. #3
    Join Date
    Jun 2009
    Posts
    6

    Default

    15 minutes.

  4. #4
    Join Date
    Jun 2009
    Posts
    6

    Default

    Anyone, please throw some ideas.

  5. #5
    Join Date
    Nov 2008
    Posts
    742

    Default

    Sorry, if it's not a session timeout issue, then I'm out of ideas. I'm not using Spring MVC with Webflow, so I've never run into that particular issue.

  6. #6
    Join Date
    Jun 2009
    Posts
    6

    Default

    It's definitely not a session timeout issue. I set the session timeout to such that it never expires. Still i faced the same issue.

    Looks like something related to flowscope expiry. When does the flow scope expires?

    Can someone from the Spring Webflow Core team can throw a light on this one?

    It's very important for us. Our major production release halted because of this issue.

  7. #7
    Join Date
    Nov 2008
    Posts
    742

    Default

    As far as I know, flow scope (and conversation scope, etc) will only expire when the session expires. I don't think it has its own independent timeout. Can you post your flow definition? It might provide some insight.

  8. #8
    Join Date
    Jun 2009
    Posts
    6

    Default

    <?xml version="1.0" encoding="UTF-8"?>

    <flow xmlns="http://www.springframework.org/schema/webflow"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/webflow
    http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">

    <var name="registrationForm" class="com.xxx.web.model.register.RegistrationForm " />
    <var name="fullyyyForm" class="com.xxx.web.model.register.FullyyyForm" />
    <var name="paymentInfo" class="com.xxx.web.model.payment.PaymentFormBean" />

    <action-state id="registerUserFormAction">
    <evaluate expression="registerUserFormAction" />
    <transition on="registrationForm" to="registrationFormView" />
    <transition on="success" to="termsAndConditionsView" />
    <transition on="yyyCheckFailed" to="enterFullyyyView" />
    <transition on="duplicateyyy" to="duplicateyyyView"/>
    <transition on="duplicateEmail" to="registrationFormView"/>
    <transition on="duplicateUserName" to="registrationFormView"/>
    <transition on="inprogress" to="intermittentFlow" />
    </action-state>

    <view-state id="registrationFormView" model="registrationForm">
    <transition on="submit" to="registerUserFormAction" />
    </view-state>

    <view-state id="termsAndConditionsView" model="registrationForm">
    <transition on="submit" to="termsAndConditionsAction" />
    </view-state>

    <action-state id="termsAndConditionsAction">
    <evaluate expression="termsAndConditionsAction" />
    <transition on="success" to="paymentForm" />
    </action-state>

    <view-state id="enterFullyyyView" model="fullyyyForm">
    <transition on="submit" to="enterFullyyyAction" />
    </view-state>

    <action-state id="enterFullyyyAction">
    <evaluate expression="enterFullyyyAction" />
    <transition on="success" to="termsAndConditionsView" />
    <transition on="duplicateyyy" to="duplicateyyyView" />
    </action-state>

    <view-state id="paymentForm" model="paymentInfo">
    <on-render>
    <evaluate expression="paymentAction.prePopulate()" result="flowScope.paymentInfo" />
    </on-render>
    <transition on="notLoggedIn" to="askLogin" />
    <transition on="next" to="payment" />
    </view-state>

    <view-state id="intermittentFlow">
    <transition on="next" to="end" />
    </view-state>

    <action-state id="payment">
    <evaluate expression="paymentAction" />
    <transition on="notLoggedIn" to="askLogin" />
    <transition on="success" to="end" />
    <transition on="failure" to="paymentForm" />
    </action-state>

    <end-state id="askLogin" view="flowRedirect:login" />
    <end-state id="cancel" view="flowRedirect:index" />
    <end-state id="duplicateyyyView" view="flowRedirect:login" />
    <end-state id="end" view="flowRedirect:registerzzz" />
    </flow>

  9. #9
    Join Date
    Jun 2009
    Posts
    6

    Default

    In the above flow defeinition we get, RegisterationForm model properties as null (After certain interval passes) when the flow reaches RegisterationUserFormAction even though in the view we populated all the values correctly

  10. #10

    Default

    We are experiencing the same thing except our flowscope variables are null after the page is idle for 10 minutes.

Posting Permissions

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