Results 1 to 2 of 2

Thread: SWF Basic question 2

  1. #1
    Join Date
    Sep 2004
    Posts
    133

    Default 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. #2
    Join Date
    Sep 2004
    Location
    Leuven, Belgium
    Posts
    1,853

    Default

    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

Similar Threads

  1. Really basic question.
    By Edward Kenworthy in forum Security
    Replies: 2
    Last Post: Sep 8th, 2005, 05:55 AM
  2. Basic transaction question
    By Christian in forum Web Flow
    Replies: 1
    Last Post: Sep 7th, 2005, 03:05 AM
  3. SWF Basic question 1
    By yfmoan in forum Web Flow
    Replies: 32
    Last Post: May 17th, 2005, 08:52 AM
  4. Acegi- Basic Question
    By john017 in forum Security
    Replies: 3
    Last Post: Apr 29th, 2005, 05:44 PM
  5. Basic question about the usage of Spring
    By sganzman in forum Container
    Replies: 1
    Last Post: Aug 24th, 2004, 10:34 AM

Posting Permissions

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