Announcement Announcement Module
No announcement yet.
RequestContext.getFlowExecutionUrl() is null in on-entry action Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • RequestContext.getFlowExecutionUrl() is null in on-entry action

    I have an action in which I need to get at the flowExecutionUrl. There is a method on the RequestContext called getFlowExecutionUrl() , but it returns a blank string. The flowExecutionUrl is available in my freemarker view though. Any idea why it is not available in the on-entry action?

    <view-state id="memberPayAndReview" view="/shop/checkout/review_pay_signed_in">
            <evaluate expression="memberPayAndReviewAction.viewOrder(order, flowRequestContext)" result="flowScope.displayOrder"/>

  • #2
    Keep in mind SWF is using the POST-REDIRECT-GET pattern under the hood, and on-entry actions occur before the REDIRECT. I suspect the new flowExecutionURL is generated after the redirect. You may want to try changing this to an on-render action and see what happens.


    • #3
      Thank you! That worked perfectly.

      I did not realize that a redirect was happening when going from view to view. Very good to know!

      Incidentally, what is your connection to the Web Flow project? I ask because your response time for posts is amazing! I really appreciate the help .

      -Jeff Johnston


      • #4
        Glad you've got it working. Although the POST-REDIRECT-GET pattern is central to the way SWF operates and how it is able to support browser back button usage, it isn't talked about nearly enough in the reference guide. In a similar manner, requestScope and request parameters will get blown away by the redirect, so if they are added to the scope before your view-state, they will only be usable in on-entry actions but not in on-render actions. Tricky stuff, if you aren't aware of what it's doing behind the scenes.

        I've got no official affiliation with the SWF project or SpringSource (unless Keith's team is hiring anytime soon?). I do have a fondness for this particular framework, having used it for the latest project at my workplace. It has weaknesses, of course, in both documentation and areas of its implementation, but compared with previous projects I've done with Struts or JSF, it's a godsend. In any case, I really want to see SWF succeed and grow, so I occasionally pop in on the forums and see where I can help.