<?xml version="1.0" encoding="UTF-8"?>
<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-1.0.xsd">

  <start-state idref="form"/>

  <view-state id="form" view="account.PasswordChangeForm">
    <render-actions>
      <action bean="account.passwordChangeAction" method="setupForm"/>
    </render-actions>
    <transition on="submit" to="authenticate">
      <action bean="account.passwordChangeAction" method="bindAndValidate"/>
    </transition>
  </view-state>

  <subflow-state id="authenticate" flow="account/authentication-sub-flow">
    <transition on="finish" to="change"/>
  </subflow-state>

  <action-state id="change">
    <action bean="account.passwordChangeAction" method="changePassword"/>
    <transition on="success" to="finish"/>
  </action-state>

  <end-state id="finish" view="account.PasswordChangeSuccess"/>

</flow>
