Search code examples
springspring-webflowcasspring-webflow-2jasig

Webflow - transition not triggered in view-state


I try to add some functionalities to Jasig CAS, so I have to add

lost_login-webflow.xml :

<flow xmlns="http://www.springframework.org/schema/webflow"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/webflow
                          http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
    <var name="lostLoginModel" class="***.*****.LostLoginModel" />

    <view-state id="viewLostLoginForm" view="casLostLoginView"
        model="lostLoginModel">
        <binder>
            <binding property="email" />
        </binder>
        <on-entry>
            <set name="viewScope.commandName" value="'lostLoginModel'" />
        </on-entry>
        <transition on="submit" to="lostLoginSubmit" />
    </view-state>

    <action-state id="lostLoginSubmit">
        <evaluate
            expression="lostLoginAction.submit(flowRequestContext, flowScope.lostLoginModel, messageContext)" />
        <transition on="success" to="viewGenericLoginSuccess" />
        <transition on="error" to="viewServiceErrorView" />
    </action-state>

    <end-state id="viewGenericLoginSuccess" view="casLoginGenericSuccessView" />
    <end-state id="viewServiceErrorView" view="viewServiceErrorView" />
</flow>

In my jsp, I set <input type="hidden" name="execution" value="${flowExecutionKey}" /> and <input type="hidden" name="_eventId" value="submit" />.

My view is well load in the url /lostLogin but nothing happen when I submit my form... (my form is based on the default form from CAS server)

Even if I replace <transition on="submit" to="lostLoginSubmit" /> with <transition on="submit" to="viewGenericLoginSuccess" /> nothing happen

So why I never go in my transition ?


Solution

  • I don't have a real answer but I updated my CAS server from 4.0.3 to 4.1.0-RC1, and the transition was invoked... (I didn't change anything in my web flow config)