Announcement Announcement Module
Collapse
No announcement yet.
SWF Basic question 2 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SWF Basic question 2

    Hi,
    Q1. Can continuations be use in subflow ? if yes , can you show some examples ? the sellItem example in the sandbox show without subflow.

    Q2. Is this a good idea to send "_flowId" request parameter to get a Flow ? it voilate my Criteria1 in the post
    ----->http://forum.springframework.org/vie...342&highlight=

    let say that l have a normal link
    Code:
    http://localhost:8080/library/admin/publisher.Search.for.Update.Delete.htm?_flowId=publisher.Update.Delete.Flow
    but if l type in the browser address bar directly the url
    Code:
    http://localhost:8080/library/admin/publisher.Search.for.Update.Delete.htm?_flowId=publisher.Create.Search.Flow
    to get another Flow , it did go in , it did not care what my *.htm action is ( l may be setup my library-servlet.xml wrongly).

    library-servlet.xml:
    Code:
    	<bean id="flowExecutionManager" class="org.springframework.web.flow.execution.servlet.HttpServletFlowExecutionManager">
    		<property name="flowExecutionStorage">
    			<bean class="org.springframework.web.flow.execution.servlet.HttpSessionContinuationFlowExecutionStorage"/>
    		</property>
    		<!-- 
    		<property name="flowExecutionStorage">
    			<bean class="org.springframework.web.flow.execution.servlet.HttpSessionFlowExecutionStorage"/>
    		</property>
    		-->
    		<!-- 
    		<property name="flowExecutionStorage">
    			<bean class="org.springframework.web.flow.execution.ClientContinuationFlowExecutionStorage">
    				<property name="compress"><value>true</value></property>
    			</bean>
    		</property>
    		-->
    	</bean>
    <!-- ************** -->
            <bean id="publisher.Create.Search.FlowController" class="org.springframework.web.flow.mvc.FlowController">
                    <property name="flow" ref="publisher.Create.Search.Flow"/>
    	</bean>
    
    	<bean id="publisher.Create.Search.Flow" class="org.springframework.web.flow.config.XmlFlowFactoryBean">
    		<property name="location" value="/WEB-INF/flows/publisher.Create.Search-flow.xml"/>
    	</bean>
    <!-- ************** -->
    	<bean id="publisher.Update.Delete.FlowController" class="org.springframework.web.flow.mvc.FlowController">
    		<property name="cacheSeconds" value="5"/>
    		<property name="flowExecutionManager" ref="flowExecutionManager"/>
    	</bean>
    
    	<bean id="publisher.Update.Delete.Flow" class="org.springframework.web.flow.config.XmlFlowFactoryBean">
    		<property name="location" value="/WEB-INF/flows/publisher.Search.for.Update.Delete-flow.xml"/>
    	</bean>
    <!-- ************** -->
    	<bean id="publisher.Update.FlowController" class="org.springframework.web.flow.mvc.FlowController">
    		<property name="cacheSeconds" value="5"/>
    		<property name="flowExecutionManager" ref="flowExecutionManager"/>
    	</bean>
    
    	<bean id="publisher.Update.Flow" class="org.springframework.web.flow.config.XmlFlowFactoryBean">
    		<property name="location" value="/WEB-INF/flows/publisher.Update-flow.xml"/>
    	</bean>
    <!-- ************** -->
    ......
    <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
            <property name="interceptors">
    			   <list>
    				     <ref local="localeChangeInterceptor"/>
    			   </list>
    		</property>
    		<property name="mappings">
    			<props>
    				<prop key="/admin/index.htm">indexView</prop>
                                    <prop key="/admin/publisher.Create.Search.htm">publisher.Create.Search.FlowController</prop>
                                    <prop key="/admin/publisher.Search.for.Update.Delete.htm">publisher.Update.Delete.FlowController</prop>
                                    <prop key="/admin/publisher.Update.htm">publisher.Update.FlowController</prop>
     			</props>
    		</property>
    	</bean>
    moon

  • #2
    Q1: Yes, this is possible. Actually, the flow storage is at the flow execution level, which can contain any number of subflows. Just make sure you use the same flow storage strategy throughout the lifetime of the flow execution (e.g. make sure, if you're using the same flow execution from diffrent flow controllers, that they're all using the same flow execution storage).

    Q2. You should either use a generic FlowController that is told which flow to run using the "_flowId" parameter or hava a seperate FlowController for each flow with an explicitly configured "flow" property to indicate the top-level flow to run. Mixing the 2 together gets confusing.

    Erwin

    Comment

    Working...
    X