Hi,
I am a newbie to SWF and portal and I have to combine their usage for a project involving login and password recovery related user flows. I am using a single flow as the point of the entry and then branching off to different subflows depending on whether the user enters by accessing the portlet directly or trying to enter a confirmation code (emailed as a link embedded in the url). Problem is that my requestParameter map is empty even when I try to pass any url parameters the first time. I am guessing it has something to do with the ViewFlowHandler but not sure.
Here is my context config:
Here is my simple ViewFlowHandler which always returns the name of my single point of entry flowCode:<!-- Maps portlet modes to handlers --> <bean id="portletModeHandlerMapping" class="org.springframework.web.portlet.handler.PortletModeHandlerMapping"> <property name="portletModeMap"> <map> <entry key="view"> <bean class="com.mycompany.login.portlet.ViewFlowHandler" /> </entry> </map> </property> </bean> <!-- Enables FlowHandlers --> <bean class="org.springframework.webflow.mvc.portlet.FlowHandlerAdapter"> <property name="flowExecutor" ref="flowExecutor"/> </bean> <!-- Executes flows: the central entry point into the Spring Web Flow system --> <webflow:flow-executor id="flowExecutor"> </webflow:flow-executor> <!-- The registry of executable flow definitions --> <webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderService"> <webflow:flow-location path="classpath:flows/login-flow.xml" /> <webflow:flow-location path="classpath:flows/main-flow.xml" /> <webflow:flow-location path="classpath:flows/pwd-recovery-flow.xml" /> </webflow:flow-registry> <webflow:flow-builder-services id="flowBuilderService" view-factory-creator="viewFactoryCreator"/> <bean id="viewFactoryCreator" class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator"> <property name="viewResolvers"> <list> <ref bean="viewResolver"/> </list> </property> </bean> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/> <property name="prefix" value="/WEB-INF/flow-views/"/> <property name="suffix" value=".jsp"/> </bean>
Code:package com.mycompany.login.portlet; import javax.servlet.http.HttpServletRequest; import org.springframework.webflow.core.collection.LocalAttributeMap; import org.springframework.webflow.core.collection.MutableAttributeMap; import org.springframework.webflow.mvc.portlet.AbstractFlowHandler; public class ViewFlowHandler extends AbstractFlowHandler{ public String getFlowId() { return "main-flow"; } }
And here is part of my single point of entry flow which redirect to other flows based on a url parameter I cannot get. I have tried all permutations - action state starts with on-entry evals, on-entry evals but my requestParameters is always empty.
Code:<action-state id="proceed"> <evaluate expression="flowNames.setNflow(requestParameters.flo)"/> <evaluate expression="flowNames.nflow"/> <transition on="pwd-recovery" to="pwd-recovery"/> <transition on="finish" to="finish-main"/> <transition to="login"/> </action-state>
And my url (emailed link):
http://localhost:8080/portal/portal/...o=pwd-recovery
I am trying to pass "flo" parameter and restart the flow for that user. And none of that is happening
My Questions:
1. How do I get url parameters from url in swf + portlet setup like this?
2. How do I instruct webflow to restart the flow when this emailed link is clicked? (not specifying an executionkey didnt work)
Thanks a lot in advance for taking the time to read this long question. Any help is appreciated a lot!


. I have tried all permutations - action state starts with on-entry evals, on-entry evals but my requestParameters is always empty.
Reply With Quote
