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

  • Nested Flow

    Hi

    i has to nested tree flows, from the first to the second i have no problem but for the second to the third it's give a runtime exception:

    No such flow definition with id 'autos' found,

    where "autos" was the id of my inner nested flow.

    The configuration that i use was:


    HTML Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE flow SYSTEM  "spring-webflow-1.0.dtd">
    <!-- File generated with Spring IDE Web Flow Editor. Visit [url]http://springide.org/[/url] -->
    <flow start-state="solicitudMain">
    	<!--action-state id="entrada">
    		<action bean="solicitudAction" method="setupForm" />
    		<transition on="success" to="solicitudMain" />
    		</action-state-->
    	<view-state id="solicitudMain" view="/solicitudFormulario">
    		<entry-actions>
    			<action bean="solicitudAction" method="setupForm"></action>
    		</entry-actions>
    		<transition on="submit" to="solicitudBusqueda">
    			<action bean="solicitudAction" method="validate">
    				<property name="validatorMethod">
    					<value>validatePriceAndItemCount</value>
    				</property>
    			</action>
    		</transition>
    	</view-state>
    	<action-state id="solicitudBusqueda">
    		<action bean="servSolicitud"
    			method="obtenerSolicitudDocumentoNumero(${flowScope.solicitud.numeroDoc})"
    			resultName="respuesta" />
    		<transition on="success" to="solicitudResultado" />
    	</action-state>
    
    	<view-state id="solicitudResultado" view="/solicitudResultado">
    		<transition on="detalle" to="verDetalle" />
    		<transition on="editar" to="solicitudEditar" />
    		<transition on="nuevaBusqueda" to="solicitudMain" />
    	</view-state>
    
    	<view-state id="solicitudEditar" view="/solicitudEditar">
    		<transition on="submit" to="solicitudFin" />
    	</view-state>
    
    	<end-state id="solicitudFin" />
    
    	<subflow-state id="verDetalle" flow="detalle">
    		<attribute-mapper>
    			<input-mapping
    				value="${externalContext.requestParameterMap.id}" as="id" />
    		</attribute-mapper>
    		<transition on="finish" to="solicitudBusqueda" />
    	</subflow-state>
    
    	<inline-flow id="autos">
    		<flow start-state="obtenerAutoDetalles">
    			<action-state id="obtenerAutoDetalles">
    				<action bean="servSolicitud"
    					method="obtenerSolicitud(${flowScope.id})"
    					resultName="solicitudes" />
    				<transition on="success" to="autoDetalle" />
    			</action-state>
    
    			<view-state id="autoDetalle" view="/autoDetalle">
    				<transition on="back" to="autoFinish" />
    			</view-state>
    			<end-state id="autoFinish" />
    		</flow>
    	</inline-flow>
    
    	<inline-flow id="detalle">
    		<flow start-state="obtenerDetalles">
    			<action-state id="obtenerDetalles">
    				<action bean="servSolicitud"
    					method="obtenerSolicitud(${flowScope.id})"
    					resultName="solicitudes" />
    				<transition on="success" to="solicitudDetalle" />
    			</action-state>
    
    			<view-state id="solicitudDetalle"
    				view="/solicitudDetalle">
    				<transition on="back" to="finish" />
    				<transition on="auto" to="verAuto" />
    			</view-state>
    
    			<subflow-state id="verAuto" flow="autos">
    				<attribute-mapper>
    					<input-mapping
    						value="${externalContext.requestParameterMap.id}" as="id"
    						from="string" to="long" />
    				</attribute-mapper>
    				<transition on="finish" to="obtenerDetalles" />
    			</subflow-state>
    
    			<!--action-state id="verAuto">
    				<action bean="servSolicitud"
    				method="obtenerSolicitud(${flowScope.id})"
    				resultName="solicitudes" />
    				<transition on="success" to="autoDetalle" />
    				</action-state>
    				
    				<view-state id="autoDetalle" view="/autoDetalle">
    				<transition on="solicitud" to="obtenerDetalles"></transition>
    				<transition on="conductor" to="verConductor"></transition>
    				<transition on="titular" to="verTitular" />
    				</view-state>
    				
    				<action-state id="verTitular">
    				<action bean="servTitular"
    				method="obtenerTitularIdAuto(${externalContext.requestParameterMap.idAuto})"
    				resultName="solicitudes" />
    				<transition on="success" to="titularDetalle" />
    				</action-state>
    				
    				<view-state id="titularDetalle" view="/titularDetalle">
    				<transition on="auto" to="verAuto"></transition>
    				</view-state>
    				
    				<action-state id="verConductor">
    				<action bean="servConductor"
    				method="obtenerConductorIdAuto(${externalContext.requestParameterMap.idAuto})"
    				resultName="solicitudes" />
    				<transition on="success" to="conductorResultado" />
    				</action-state>
    				
    				<view-state id="conductorResultado"
    				view="/conductorResultado">
    				<transition on="detalle" to="verConductor2" />
    				<transition on="auto" to="verAuto" />
    				</view-state>
    				
    				<action-state id="verConductor2">
    				<action bean="servConductor"
    				method="obtenerConductor(${externalContext.requestParameterMap.idConductor})"
    				resultName="solicitudes" />
    				<transition on="success" to="conductorDetalle" />
    				</action-state>
    				
    				<view-state id="conductorDetalle"
    				view="/conductorDetalle">
    				<transition on="conductor" to="verAuto"></transition>
    				</view-state-->
    
    			<end-state id="finish" />
    		</flow>
    	</inline-flow>
    
    </flow>
    the order of the definitions was the only one that the ide let me do.

    Thanks

    Javier
    Last edited by Keith Donald; Jan 18th, 2006, 05:20 PM.

  • #2
    I see. Try defining your 'autos' inline-flow inside your 'detalle' flow -- I noticed it wasn't used by the top-level flow. Currently in-line flows are _local_ to a single flow definition only (thus, your detalle flow can't see the autos flow, because it's defined in the parent).

    Keith

    Comment


    • #3
      Keith:

      I finish with this configuration:
      HTML Code:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE flow SYSTEM  "spring-webflow-1.0.dtd">
      <!-- File generated with Spring IDE Web Flow Editor. Visit [url]http://springide.org/[/url] -->
      <flow start-state="solicitudMain">
      	<view-state id="solicitudMain" view="/solicitudFormulario">
      		<entry-actions>
      			<action bean="solicitudAction" method="setupForm"></action>
      		</entry-actions>
      		<transition on="submit" to="solicitudBusqueda">
      			<action bean="solicitudAction" method="validate">
      				<property name="validatorMethod">
      					<value>validatePriceAndItemCount</value>
      				</property>
      			</action>
      		</transition>
      	</view-state>
      	<action-state id="solicitudBusqueda">
      		<action bean="servSolicitud"
      			method="obtenerSolicitudDocumentoNumero(${flowScope.solicitud.numeroDoc})"
      			resultName="respuesta" />
      		<transition on="success" to="solicitudResultado" />
      	</action-state>
      
      	<view-state id="solicitudResultado" view="/solicitudResultado">
      		<transition on="detalle" to="verDetalle" />
      		<transition on="editar" to="solicitudEditar" />
      		<transition on="nuevaBusqueda" to="solicitudMain" />
      	</view-state>
      
      	<view-state id="solicitudEditar" view="/solicitudEditar">
      		<transition on="submit" to="solicitudFin" />
      	</view-state>
      
      	<end-state id="solicitudFin" />
      
      	<subflow-state id="verDetalle" flow="detalle">
      		<attribute-mapper>
      			<input-mapping
      				value="${externalContext.requestParameterMap.id}" as="id" />
      		</attribute-mapper>
      		<transition on="finish" to="solicitudBusqueda" />
      	</subflow-state>
      
      	<inline-flow id="detalle">
      		<flow start-state="obtenerDetalles">
      			<action-state id="obtenerDetalles">
      				<action bean="servSolicitud"
      					method="obtenerSolicitud(${flowScope.id})"
      					resultName="solicitudes" />
      				<transition on="success" to="solicitudDetalle" />
      			</action-state>
      
      			<view-state id="solicitudDetalle"
      				view="/solicitudDetalle">
      				<transition on="back" to="finish" />
      				<transition on="auto" to="verAuto" />
      			</view-state>
      
      			<subflow-state id="verAuto" flow="autos">
      				<attribute-mapper>
      					<input-mapping
      						value="${externalContext.requestParameterMap.id}" as="id" />
      				</attribute-mapper>
      				<transition on="autoFinish" to="obtenerDetalles" />
      			</subflow-state>
      
      			<end-state id="finish" />
      			<inline-flow id="autos">
      				<flow start-state="obtenerAutoDetalles">
      					<action-state id="obtenerAutoDetalles">
      						<action bean="servSolicitud"
      							method="obtenerSolicitud(${flowScope.id})"
      							resultName="solicitudes" />
      						<transition on="success" to="autoDetalle" />
      					</action-state>
      
      					<view-state id="autoDetalle" view="/autoDetalle">
      						<transition on="solicitud" to="autoFinish"></transition>
      						<transition on="conductor" to="verConductor"></transition>
      						<transition on="titular" to="verTitular" />
      					</view-state>
      
      					<action-state id="verTitular">
      						<action bean="servTitular"
      							method="obtenerTitularIdAuto(${externalContext.requestParameterMap.idAuto})"
      							resultName="solicitudes" />
      						<transition on="success" to="titularDetalle" />
      					</action-state>
      
      					<view-state id="titularDetalle"
      						view="/titularDetalle">
      						<transition on="auto"
      							to="obtenerAutoDetalles">
      						</transition>
      					</view-state>
      
      					<subflow-state id="verConductor" flow="conductor">
      						<attribute-mapper>
      							<input-mapping
      								value="${externalContext.requestParameterMap.idAuto}"
      								as="idAuto" />
      						</attribute-mapper>
      						<transition on="conductorFinish"
      							to="obtenerAutoDetalles" />
      					</subflow-state>
      
      					<end-state id="autoFinish" />
      
      					<inline-flow id="conductor">
      						<flow start-state="obtenerConductorDetalles">
      							<action-state
      								id="obtenerConductorDetalles">
      								<action bean="servConductor"
      									method="obtenerConductorIdAuto(${flowScope.idAuto})"
      									resultName="solicitudes" />
      								<transition on="success"
      									to="conductorResultado" />
      							</action-state>
      
      							<view-state id="conductorResultado"
      								view="/conductorResultado">
      								<transition on="detalle"
      									to="verConductor2" />
      								<transition on="auto"
      									to="conductorFinish" />
      							</view-state>
      
      							<action-state id="verConductor2">
      								<action bean="servConductor"
      									method="obtenerConductor(${externalContext.requestParameterMap.idConductor})"
      									resultName="solicitudes" />
      								<transition on="success"
      									to="conductorDetalle" />
      							</action-state>
      
      							<view-state id="conductorDetalle"
      								view="/conductorDetalle">
      								<transition on="conductor"
      									to="obtenerConductorDetalles">
      								</transition>
      							</view-state>
      							<end-state id="conductorFinish" />
      
      						</flow>
      					</inline-flow>
      
      				</flow>
      			</inline-flow>
      
      		</flow>
      	</inline-flow>
      
      </flow>
      and thanks all it's work

      Javier

      Comment

      Working...
      X