Announcement Announcement Module
No announcement yet.
${flowExecutionKey} Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • ${flowExecutionKey}

    I've seen the following line all over the places in the webflow examples

    <input type="hidden" name="_flowExecutionKey" value="${flowExecutionKey}">

    However, I couldn't find where and how the ${flowExecutionKey} is initially set in the context. I try to apply phonebook workflow into my application and i keep getting the following error: xecutorArgumentExtractionException: Unable to extract the flow execution key parameter: make sure the client provides the '_flowExecutionKey' parameter as input; the parameters provided in this request are: map['_eventId_search' -> 'Search', '_flowExecutionKey' -> '', 'sysName' -> '', 'bookName' -> '', '_flowId' -> 'book-search-flow'] stParameterFlowExecutorArgumentHandler.extractFlow ExecutionKey(RequestParameterFlowExecutorArgumentH equestHandler.handleFlowRequest(FlowRequestHandler .java:112)
    org.springframework.webflow.executor.mvc.FlowContr oller.handleRequestInternal( 0)
    com.jpm.cristal.adminweb.mvc.controller.BookFlowCo ntroller.handleRequestInternal(BookFlowController. java:15)
    org.springframework.web.servlet.mvc.AbstractContro ller.handleRequest(
    org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter.handle(SimpleControllerHandlerAda
    org.springframework.web.servlet.DispatcherServlet. doDispatch(
    org.springframework.web.servlet.DispatcherServlet. doService(
    org.springframework.web.servlet.FrameworkServlet.p rocessRequest(
    org.springframework.web.servlet.FrameworkServlet.d oPost(
    javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)

    However, the flowExecutionKey value must be of the format _c<conversationId>_k<continuationId>. It looks like it's generated by within the framework. But my jsp page just evaluate the ${flowExecutionKey} as empty string "".

    Did I miss anything? Thanks for any hint on this.

  • #2
    Strange. SWF will automatically add the flowExecutionKey to the model that is exposed to the view. In the case of a JSP the view model is put in the request attributes so ${flowExecutionKey} just outputs the value of that request attribute. You don't need to do anything to get the flowExecutionKey exposed to the JSP, it's all done automatically for you.

    What Servlet engine are you using? Have you tried deploying the phonebook sample? Does that work for you?



    • #3
      Erwin, thanks for the resply.

      In fact, I didn't deploy the phonebook sample to run it. What I did was to follow the search flow in the phonebook code and make some adjustments pertaining to my situation.

      My jsp page is laid out by tiles. and I subclassed the FlowController class in such a way that I can reset the view name of the ModelAndView in handleRequestInternal() method, like this:

      public class BookFlowController extends FlowController {
      private String viewName;

      protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
      ModelAndView mav = super.handleRequestInternal(request, response);
      mav.addObject("bookInfo", new BookInfo());
      return mav;

      public String getViewName() {
      return viewName;

      public void setViewName(String viewName) {
      this.viewName = viewName;

      I even tried to print out the value from request.getAttribute("flowExecutionEvent") and "_flowExecutionEvent" both got me null values.

      Please give me more advise. In addition, how do I enable the "debug" mode to see the detailed messages from webflow?



      • #4
        PS, I am running Tomcat5.5 and Java1.5 + springframework2.0 and webflow1.0


        • #5
          Never mind. I have found what I did wrong.

          I was so new to the webflow that I didn't adapt quickly enough the underlying logic of the flow definition. I shouldn't have subclassed the FlowController as mentioned above, where it's smart enough to figure out what corret view to use as long as I configure this properly in the flow xml.

          I have just gone over this hurdle and be able to proceed for the next one.



          • #6

            SWF uses commons logging to output log messages. Commons logging delegates to log4j if found on the classpath, or to JDK logging otherwise. So you just have to configure the "org.springframework.webflow" category to DEBUG level using either log4j or JDK logging configuration. Check which logging system you're using and the documentation of it to find out more.



            • #7
              I am having the same exception, but I didn't extend the FlowController. I configure the class in the flow.xml like this:

              <bean id="portletModeControllerMapping"
              class="org.springframework.web.portlet.handler.Por tletModeHandlerMapping">
              <property name="portletModeMap">
              <entry key="view" value-ref="flowController" />

              What could be the problem?