Announcement Announcement Module
Collapse
No announcement yet.
end state not finishing conversation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • end state not finishing conversation

    When my flow ends, and the conversation has ended why does webflow keep referring to the just ended conversation.

    For eg: I have a flow which takes a long time to finish because at the end it needs to add over 25K new rows to the db. Now at the end when the flow finishes i keep getting an error
    Code:
    Caused by: org.springframework.webflow.conversation.NoSuchConversationException: No conversation could be found with id '1' -- perhaps this conversation has ended?
    the flow end state has been defined and there is no other end state or exception.
    Code:
    <end-state id="finish"/>
    When the same flow is run with a smaller set of data the flowExecutionKey, in the url, tipped me off that webflow wants to refer to the conversation that has just ended. it is
    Code:
    _flowExecutionKey=e1s3
    that means i suppose execution 1 and session 3 and i would like it to be execution 2 session 1.

    Am I thinking about the end state the wrong way or should i add something to end state declaration that should end the conversation. and next reference should launch a second conversation or execution

    thanks for your help


    ~s.

    PS : I am running webflow 2.2.1.RELEASE

  • #2
    I have a flow which takes a long time to finish because at the end it needs to add over 25K new rows to the db.
    I think you mean in an action-state prior to the end state right?

    If I am correct I suggest you pass from your action-state to a view-state indicating a successful message and then with a button go to the end-state

    the flow end state has been defined and there is no other end state or exception. <end-state id="finish"/>
    I could suggest use a redirect attribute

    Am I thinking about the end state the wrong way or should i add something to end state declaration that should end the conversation. and next reference should launch a second conversation or execution
    Post your flow definition for a better understanding

    Comment


    • #3
      I think you mean in an action-state prior to the end state right?
      yes you are accurate... but it does not go to a view state... if the action state expression encounters errors then it goes back to the previous view state.

      if it is successful it directly goes to the end-state.


      And I tried your redirect idea

      Code:
      <end-state id="finish"  view="externalRedirect:../apply_dues.htm?_flowId=complexDues-flow"/>
      still it goes back to the previous conversation

      I am surprised no one else faces this issue, may be because their flow executions are not as long as mine.

      FWIW the entire flow definition
      Code:
      <?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"
      	start-state ="complexDuesSearchForm">
      
      	<on-start>
      		<evaluate expression="complexDues.setupReferrer"/>
      		<evaluate expression="complexDues.setupForm"/>
      		<evaluate expression="complexDues.setupReferenceData"/>
      	</on-start>
      	
      	<view-state id="complexDuesSearchForm" view="complexDuesSearch">
      		<on-entry>
      			<evaluate expression="complexDues.setupSearchPage"/>
      		</on-entry>
      		<on-render>
      			<evaluate expression="complexDues.initMenuItem"/>
      		</on-render>
      		<on-exit>
      			<evaluate expression="complexDues.bind"/>
      			<evaluate expression="complexDues.processSearchForm"/>
      			<evaluate expression="complexDues.doSearch"/>
      	    </on-exit>
      	</view-state>
      	
      	<view-state id="complexDuesSummaryForm" view="complexDuesPayrollSummary">
      		<on-entry>
      			<evaluate expression="complexDues.getMemberResults"/>
      			<evaluate expression="complexDues.setupSummaryPage"/>
      		</on-entry>
      		<on-render>
      			<evaluate expression="complexDues.initMenuItem"/>
      		</on-render>
      		<on-exit>
      			<evaluate expression="complexDues.bind"/>  
      			<evaluate expression="complexDues.updateMemberMaps"/>         		
      	    </on-exit>
      	</view-state>
      	
      	<view-state id="complexDuesSummaryMemberPage" view="complexDuesPayrollSummary">
      		<on-entry>
      			<evaluate expression="complexDues.pageMemberResults"/>
      			<evaluate expression="complexDues.setupSummaryPage"/>
      		</on-entry>
      		<on-render>
      			<evaluate expression="complexDues.initMenuItem"/>
      		</on-render>
      		<on-exit>
      			<evaluate expression="complexDues.bind"/>
      			<evaluate expression="complexDues.updateMemberMaps"/>            		
      	    </on-exit>
      	</view-state>
      	
      	<view-state id="complexDuesSummaryMemberSort" view="complexDuesPayrollSummary">
      		<on-entry>
      			<evaluate expression="complexDues.sortMemberResults"/>
      			<evaluate expression="complexDues.setupSummaryPage"/>
      		</on-entry>
      		<on-render>
      			<evaluate expression="complexDues.initMenuItem"/>
      		</on-render>
      		<on-exit>
      			<evaluate expression="complexDues.bind"/>
      			<evaluate expression="complexDues.updateMemberMaps"/>            		
      	    </on-exit>
      	</view-state>
      	
      	<subflow-state id="memberUpdate" subflow="member-flow">	
      		<input name="subflow" value="flowScope.subflow" />
      		<input name="indOrgCode" value="flowScope.indOrgCode" />
      		<input name="memberId" value="flowScope.memberId" />	
      		<input name="relatedId" value="flowScope.relatedId" />	
      		<output name="mastId" value="flowScope.mastId" />
      		<transition on="finishSubflow" to="processMemberFlow"/>
      	</subflow-state>
      	
      	<action-state id="setupSubflow">
           	<evaluate expression="complexDues.setUpMemberFlow"/>
      		<transition on="success" to="memberUpdate"/>
      		<transition on="error" to="complexDuesSummaryForm"/>    
          </action-state>
          
          
           
          <action-state id="processMemberFlow">
          	<evaluate expression="complexDues.processMemberFlow"/>
      		<transition on="*" to="complexDuesSummaryForm"/> 
           </action-state>
      			
      	<action-state id="processSummaryForm">
      		<evaluate expression="complexDues.processSummaryForm"/>
      		<transition on="success" to="complexDuesSearchForm"/>
      		<transition on="error" to="complexDuesSummaryForm"/>    
           </action-state>
           
           
           
      	<end-state id="finish"  view="externalRedirect:../apply_dues.htm?_flowId=complexDues-flow"/>
      	
      	<global-transitions>
      		<transition on="search" to="complexDuesSummaryForm"/>
      		<transition on="searchMember" to="complexDuesSummaryForm"/>
      		<transition on="pageMember" to="complexDuesSummaryMemberPage"/>
      		<transition on="sortMember" to="complexDuesSummaryMemberSort"/>
      		<transition on="process" to="processSummaryForm"/>
      		<transition on="cancelDues" to="complexDuesSearchForm"/>
      		<transition on="editMember" to="setupSubflow"/>
      		<transition on="addMember" to="setupSubflow"/>
      		<transition on="cancel" to="finish"/>
      	</global-transitions>
      
      </flow>
      thanks.

      Comment


      • #4
        I am not certain but I believe I am experience the same issue also... I have posted my scenario here http://forum.springsource.org/showth...459#post347459

        Comment


        • #5
          bump !!

          Comment


          • #6
            Sorry but I need a lead... BUMP

            Comment


            • #7
              I increased the session time outs from 30 to 90 in tomcat/conf web.xml and that seemed to get rid of error

              Comment


              • #8
                your solution seems right!

                SWF stores conversation state into HTTP session and hence if session expires the conversation state that SWF manages also expires.

                Also, running the flow for 25K rows of data will take some time to and hence you need to tweak session timeout accordingly.

                Comment

                Working...
                X