Announcement Announcement Module
No announcement yet.
Redirect to external JSP? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Redirect to external JSP?

    I'm new to web flow and I wonder if it possible to redirect to a page that is outside the "flow"? E.g. when I enter the second state I'd like to redirect to a jsp page not located in the view folder but rather in the jsp folder in the root directory of the web-app. Ideally I'd like to continue the flow normally after a submit from the "external" JSP.

  • #2
    Well conversational redirects from view-states is supported using the "redirect" attribute--but that's to a well defined conversation URL, not an external URL.

    See the reference docs:

    Currently, you cannot redirect to an arbitrary EXTERNAL URL from a view state and then have that random page submit back to the flow. In order for that to work you'd have to send the flowExecutionId through the redirect, and the page rendered at the external URL would need to be somewhat flow state aware (in order to signal the correct event on the next request). That sounds a bit iffy to me.

    What is the use case exactly? Is there a reason why this view can't be a regular view selected by the flow and redirected to using a conversational redirect as described in the docs?
    Last edited by Keith Donald; Feb 17th, 2006, 07:27 AM.


    • #3
      I too have been looking at how this can be done. For my situation I require to redirect the user to another page flow (not using SWF) on a different server. This server will do some processing and then redirect the user back to me.

      I can supply the URL that the user comes back to so presuambly I would need to include the _flowExecutionId and possibly an _eventId (result of the external flow) but I don't know how to start this redirection process.

      Just to add, the URL of the remote server is dynamic so I can't hard code this in the flow.

      Am thinking of something like this..?

      <view-state id="start" view="redirect:hostname/required/path/${dynamic.bit}"/>
      Last edited by TonyKL; Feb 17th, 2006, 08:51 AM.


      • #4
        I think SWF as is with 1.0 rc1 nightly can just about meet your needs here. Specifically:

        - You can dynamically generate the redirect URL from the view-state that requests the redirect by using a custom view selector strategy.

        - You can save the conversationId through your redirect and the resubmit back to the conversation URL when you're done.

        The issue is you can't currently redirect to an external URL from a ViewState, only an EndSTate. That behavior was recently removed because at the time it didn't seem to make sense. But it seems to make sense as long as you send the conversationId through to the external URL, so that id can stored and used later to get back to the current page of the flow.

        This seems feasible; can you create a JIRA issue?



        • #5
          I have created the following entry in the JIRA

          I see currently it is only possible to do the redirect from the root flows end state. I tried it from subflow but to no avail. Unfortunately for me it is a requirement that we talk to this 3rd party and I'd love to carry on using SWF.


          • #6
            Well you can redirect from a view-state, too, just to a conversation URL, not to an external URL and then back to the conversation URL later. That's the enhancement that is needed.



            • #7
              Sorry, I should have said external redirect.