Announcement Announcement Module
Collapse
No announcement yet.
How keep query string parameters in a flow url? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How keep query string parameters in a flow url?

    Hello
    I have a flow that i start passing some query string in as parameter:

    Code:
    <a href="/flowx?id=123">click here</a>
    when the flow start I capture those parameters and use them, my problem is that those parameter
    disappear from the address that becames something like:

    http://host/myapp/flowx?execution=e1s1
    instead I would like this:
    http://host/myapp/flowx?execution=e1s1&id=123

    because i use some javascript to keep navigation through the site and I would like also to be able to restart a flow with correct parameters even navigating with back and forward button ( that works perfectly fine with flows that does not require some input data passed as request parameters )

  • #2
    Hi, Did you get a solution for this? I am facing the same problem. Thanks in advance.

    Comment


    • #3
      it was not possible by the default with spring classes. I had to extend DefaultFlowUrlHandler, FlowHandlerAdapter, and FlowHandlerMapping to add few lines of custom code. Then in spring configuration define those custom classes as the ones to use instead of the default spring ones.

      the final result is that I pass parameters to the flow like this:

      http://host/myapp/flowx/id/123/?execution=e1s1

      flowx
      is interpreted as the flow name for the search in the flow registry; id as the name of the parameter and 123 as the value. You can add as many parameter as you want after the flow name. In case of exception and restart of the flow, the parameters are kept and so everything goes nicely.

      Comment

      Working...
      X