Announcement Announcement Module
Collapse
No announcement yet.
Subflow throws NoSuchConversationException Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Subflow throws NoSuchConversationException

    Versions: Spring 2.5.6 SEC02
    Webflow: 2.0.9

    Will anyone help me understand Webflow? I have included my configuration below, and I would like to expand on what I already have. I have also included some logging from webflow, which shows the configuration works up until the error message. The error message I am getting is

    Caused by: org.springframework.webflow.conversation.NoSuchCon versationException: No conversation could be found with id '1' -- perhaps this conversation has ended?
    It doesn't make any sense, or maybe I'm just missing something. Either way I could use some insite in what I can do to fix this problem. Thanks in advance for your help.


    My main flow contains only subflows (menu items) to which most are just single view-states.

    Code:
    <decision-state id="decisionState">
        <if test="currentEvent eq null" then="mainView"/>
        <if test="currentEvent.id eq 'notes'" then="notesSubflow"/>
        <if test="currentEvent.id eq 'config'" then="configSubflow"/>
    </decision-state>
    
    <view-state id="mainView" view="main/instructions">
    </view-state>
    
    <subflow-state id="notesSubflow" subflow="main/notes"></subflow-state>
    <subflow-state id="configSubflow" subflow="main/config"></subflow-state>
    
    <global-transitions>
        <transition on="notes" to="notesSubflow"/>
        <transition on="config" to="configSubflow"/>
    </global-transitions>
    The notes subflow contains two view-state(s). This subflow also inherits from a commons flow, see below.

    Code:
    <flow ... parent="main/commons">
    <view-state id="notesView" model="notesViewForm" view="main/notes/notesView">
    ...
    </view-state>
    
    <view-state id="notesForm" model="notesViewForm" view="main/notes/notesForm">
    ...
    </view-state>
    </flow>
    The commons flow contains all the end states and global transitions, so that I don't have to define all the end states and global transitions (also knowing the system is going to grow having all this in one place makes is convenient).

    Code:
    <flow .... abstract="true">
        <end-state id="notes"/>
        <end-state id="config"/>
    
        <global-transitions>
             <transition on="notes" to="notes" bind="false" validate="false"/>
             <transition on="config" to="config" bind="false" validate="false"/>
        </global-transitions>
    
    </flow>
    The config subflow is unique in that this subflow calls another subflow.

    Code:
    <flow ... parent="main/commons">
        <view-state id="configView" model="configViewForm" view="main/config/configView">
             ....
        </view-state>
    
        <subflow-state id="configSubflow" subflow="main/config/workflow">
        </subflow-state>
    </flow>
    The config subflow is defined below. This is a workflow which produces configurations which are displayed in the view. If I click on one of the other menu items while in this flow. That is when I get the error message.

    Code:
    <flow ... parent="main/commons">
        <view-state id="configStart" model="configForm" view="main/config/configStart">
             ....
        </view-state>
    
        <view-state id="bldgSelections" model="configForm" view="main/config/bldgSelections">
             ....
        </view-state>
    </flow>

  • #2
    DEBUG Stack Trace:

    2011-12-21 08:09:03,020 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.mvc.servlet.FlowHandle rMapping - Mapping request with URI '/SampleApp/page/main' to flow with id 'main'
    2011-12-21 08:09:03,021 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.executor.FlowExecutorI mpl - Resuming flow execution with key 'e2s4
    2011-12-21 08:09:03,021 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.conversation.impl.Sess ionBindingConversationManager - Locking conversation 2
    2011-12-21 08:09:03,021 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.repository.i mpl.DefaultFlowExecutionRepository - Getting flow execution with key 'e2s4'
    2011-12-21 08:09:03,022 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.definition.registry.Fl owDefinitionRegistryImpl - Getting FlowDefinition with id 'main'
    2011-12-21 08:09:03,024 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.definition.registry.Fl owDefinitionRegistryImpl - Getting FlowDefinition with id 'main/config'
    2011-12-21 08:09:03,024 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.factory.Cond itionalFlowExecutionListenerLoader - Loaded [2] of possible 2 listeners for this execution request for flow 'main', the listeners to attach are list[com.sampleApp.utils.DebuggingFlowExecutionListener @1a0a7721, com.common.security.utils.SecurityEnforcingFlowExe cutionListener@53a9c262]
    2011-12-21 08:09:03,025 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.engine.impl.FlowExecut ionImpl - Resuming in org.springframework.webflow.mvc.servlet.MvcExterna lContext@3bc60b9e
    2011-12-21 08:09:03,025 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.mvc.view.AbstractMvcVi ew - Processing user event 'notes'
    2011-12-21 08:09:03,025 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.mvc.view.AbstractMvcVi ew - Resolved model com.sampleApp.web.config.forms.ApplicationConfigFo rm@352998ea
    2011-12-21 08:09:03,025 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.engine.ViewState - Event 'notes' returned from view [ServletMvcView@2dd6ad14 view = org.springframework.web.servlet.view.JstlView: name 'main/config/bldgSelection'; URL [/WEB-INF/jsp/main/config/bldgSelections.jsp]]
    2011-12-21 08:09:03,025 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.engine.Transition - Executing [Transition@68fd138e on = notes, to = notes]
    2011-12-21 08:09:03,025 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.engine.Transition - Exiting state 'bldgSelections'
    2011-12-21 08:09:03,026 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.engine.EndState - Entering state 'notes' of flow 'main/config'
    2011-12-21 08:09:03,026 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.engine.SubflowState - Mapping subflow output map[[empty]]
    2011-12-21 08:09:03,026 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.engine.Transition - Executing [Transition@46023a6f on = notes, to = notesSubflow]
    2011-12-21 08:09:03,027 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.engine.Transition - Exiting state 'configSubflow'
    2011-12-21 08:09:03,027 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.engine.SubflowState - Entering state 'notesSubflow' of flow 'main'
    2011-12-21 08:09:03,027 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.definition.registry.Fl owDefinitionRegistryImpl - Getting FlowDefinition with id 'main/notes'
    2011-12-21 08:09:03,027 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.engine.builder.Default FlowHolder - Assembling the flow for the first time
    2011-12-21 08:09:03,056 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.engine.SubflowState - Calling subflow 'main/notes' with input map[[empty]]
    2011-12-21 08:09:03,056 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.AnnotatedAct ion - Putting action execution attributes map[[empty]]
    2011-12-21 08:09:03,057 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.AnnotatedAct ion - Clearing action execution attributes map[[empty]]
    2011-12-21 08:09:03,057 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.ActionExecut or - Executing [EvaluateAction@12a74c97 expression = buildingService.resolveBuildings(conversationScope .buildings), resultExposer = [ActionResultExposer@25955712 result = conversationScope.buildings, resultType = [null]]]
    2011-12-21 08:09:03,057 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.AnnotatedAct ion - Putting action execution attributes map[[empty]]
    2011-12-21 08:09:04,133 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.AnnotatedAct ion - Clearing action execution attributes map[[empty]]
    2011-12-21 08:09:04,134 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.ActionExecut or - Finished executing [EvaluateAction@12a74c97 expression = buildingService.resolveBuildings(conversationScope .buildings), resultExposer = [ActionResultExposer@25955712 result = conversationScope.buildings, resultType = [null]]]; result = success
    2011-12-21 08:09:04,134 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.ActionExecut or - Executing [EvaluateAction@7969b5d2 expression = notesFormAction.setupForm, resultExposer = [null]]
    2011-12-21 08:09:04,134 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.AnnotatedAct ion - Putting action execution attributes map[[empty]]
    2011-12-21 08:09:04,134 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.ActionExecut or - Executing [NotesFormAction@b202c44 formObjectName = 'notesForm', formObjectClass = NotesForm, formObjectScope = Flow]
    2011-12-21 08:09:04,134 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.AnnotatedAct ion - Putting action execution attributes map['method' -> 'setupForm']
    2011-12-21 08:09:04,135 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.AnnotatedAct ion - Clearing action execution attributes map['method' -> 'setupForm']
    2011-12-21 08:09:04,135 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.ActionExecut or - Finished executing [NotesFormAction@b202c44 formObjectName = 'notesForm', formObjectClass = NotesForm, formObjectScope = Flow]; result = success
    2011-12-21 08:09:04,135 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.AnnotatedAct ion - Clearing action execution attributes map[[empty]]
    2011-12-21 08:09:04,135 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.ActionExecut or - Finished executing [EvaluateAction@7969b5d2 expression = notesFormAction.setupForm, resultExposer = [null]]; result = success
    2011-12-21 08:09:04,135 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.ActionExecut or - Executing [EvaluateAction@59fb876 expression = notesFormAction.setupReferenceData, resultExposer = [null]]
    2011-12-21 08:09:04,135 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.AnnotatedAct ion - Putting action execution attributes map[[empty]]
    2011-12-21 08:09:04,135 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.ActionExecut or - Executing [NotesFormAction@b202c44 formObjectName = 'notesForm', formObjectClass = NotesForm, formObjectScope = Flow]
    2011-12-21 08:09:04,135 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.AnnotatedAct ion - Putting action execution attributes map['method' -> 'setupReferenceData']
    2011-12-21 08:09:04,209 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.AnnotatedAct ion - Clearing action execution attributes map['method' -> 'setupReferenceData']
    2011-12-21 08:09:04,209 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.ActionExecut or - Finished executing [NotesFormAction@b202c44 formObjectName = 'notesForm', formObjectClass = NotesForm, formObjectScope = Flow]; result = success
    2011-12-21 08:09:04,209 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.AnnotatedAct ion - Clearing action execution attributes map[[empty]]
    2011-12-21 08:09:04,210 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.execution.ActionExecut or - Finished executing [EvaluateAction@59fb876 expression = notesFormAction.setupReferenceData, resultExposer = [null]]; result = success
    2011-12-21 08:09:04,210 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.engine.ViewState - Entering state 'notesView' of flow 'main/notes'
    2011-12-21 08:09:04,210 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.engine.impl.FlowExecut ionImpl - Attempting to handle [org.springframework.webflow.execution.FlowExecutio nException: Exception thrown in state 'notesView' of flow 'main/notes'] with root cause [org.springframework.webflow.conversation.NoSuchCon versationException: No conversation could be found with id '2' -- perhaps this conversation has ended? ]
    2011-12-21 08:09:04,210 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.engine.impl.FlowExecut ionImpl - Rethrowing unhandled flow execution exception
    2011-12-21 08:09:04,210 DEBUG httpSSLWorkerThread-8080-0 org.springframework.webflow.conversation.impl.Sess ionBindingConversationManager - Unlocking conversation 2

    Comment


    • #3
      I think something wrong with your subflow attribute. Does it match the subflow or is the subflow exist?

      Comment


      • #5
        This is my subflow, hope it might help you.

        Menu Flow
        HTML 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"
              >
        
        	<var name="beanTO" class="com.xxx.models.views.transferObjects.beanTO" />
        	
                    <view-state id="menu">
        		<transition on="selectedProject" to="selectedProjectFlow"/>
        		<transition on="addProject" to="addProjectFlow"/>
        	</view-state>	
        	<subflow-state id="selectedProjectFlow" subflow="optionView">
        		<input name="project" value="requestParameters.selectedProject"/>
        		<transition on="done" to="menu" />	
                     </subflow-state>
        </flow>
        Option View Flow
        HTML 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">
        	
        	<var name="optionViewTO" class="com.xxx.models.views.transferObjects.OptionViewTO" />
        	<input name="project" />
        
        	<view-state id="optionView" >
        		<transition on="doneTask" to="selectedViewFlow">
        			<evaluate 
        				expression="optionModeService.selectView(optionViewTO, requestParameters.selectedView)"/>
        					
        		<transition on="backMenu" to="done"/>
                     </view-state>
        		
        	<end-state id="done" />	
        </flow>

        Comment

        Working...
        X