Announcement Announcement Module
Collapse
No announcement yet.
External Redirect from View State Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • External Redirect from View State

    Hi,

    I have the following code in my Webflow XML file:

    <view-state id="portalPage" view="home/portal">
    <transition on="payBalance" to="payBalance"/>
    </view-state>

    <view-state id="payBalance" view="externalRedirect:${paymentURL}">
    <transition on="processPayment" to="processPayment"/>
    </view-state>

    <decision-state id="processPayment">
    ....
    </decision-state>

    And I keep getting the following error when attempting to get back to the flow from the external redirect URL (the callback URL is passed as a parameter to the external redirect URL):

    org.springframework.webflow.engine.NoMatchingTrans itionException: No transition found on occurence of event 'processPayment' in state 'portalPage' of flow 'wss-flow' -- valid transitional criteria are array<TransitionCriteria>[payBalance] -- likely programmer error, check the set of TransitionCriteria for this state
    at org.springframework.webflow.engine.TransitionableS tate.getRequiredTransition(TransitionableState.jav a:93)
    at org.springframework.webflow.engine.TransitionableS tate.handleEvent(TransitionableState.java:119)
    at org.springframework.webflow.engine.Flow.handleEven t(Flow.java:555)
    etc..

    The callback URL is:

    http://...../wss-flow.page?execution...processPayment

    The redirect URL is on a different server from the Webflow application.

    The execution key is included in the URL but it appears that Webflow does not know which view state it was in when the external redirect was called. Does anybody have any idea what could be causing this?

    Many thanks in advance,
    Jacqui

  • #2
    Found the answer here http://forum.springsource.org/showthread.php?t=62704 - Webflow does not go back to the view state that has the external redirect after the callback in order to avoid a redirect cycle.

    Comment


    • #3
      Hi! I try make external redirect , but I staying on the same page and view:

      Code:
      <view-state id="creation" model="payment">
            ....
            <transition on="saveAs" to="redirectToExtPage" validate="false">
                  <evaluate expression="redirector.getRedirect(externalContext.nativeRequest)" result="conversationScope.redirectTo"/>
                   
            </transition>
      </view-state>
      
      <end-state id="redirectToExtPage" view="externalRedirect:${conversationScope.redirectTo}"/>
      I even tried set value explicitly:

      Code:
      <view-state id="creation" model="payment">
            ....
            <transition on="saveAs" to="redirectToExtPage" validate="false">
                  <set name="conversationScope.redirectTo" value="'http://localhost:8080/group/myExtPage'"/>
                   
            </transition>
      </view-state>
      And result is same view

      Explain please, what I do wrong and how to make redirect?
      Last edited by jbubsk; Mar 28th, 2013, 02:36 AM.

      Comment

      Working...
      X