Results 1 to 8 of 8

Thread: end state not finishing conversation

  1. #1
    Join Date
    May 2006
    Posts
    112

    Default 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. #2
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    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
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  3. #3
    Join Date
    May 2006
    Posts
    112

    Default

    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.

  4. #4
    Join Date
    Sep 2005
    Posts
    13

    Default

    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

  5. #5
    Join Date
    May 2006
    Posts
    112

    Default

    bump !!

  6. #6
    Join Date
    May 2006
    Posts
    112

    Default

    Sorry but I need a lead... BUMP

  7. #7
    Join Date
    May 2006
    Posts
    112

    Default

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

  8. #8
    Join Date
    Dec 2010
    Posts
    175

    Smile

    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.

Posting Permissions

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