<?xml version="1.0"?>
<!--
 Copyright 2005-2006 The Apache Software Foundation.
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at
 
      http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->
<scxml              xmlns="http://www.w3.org/2005/01/SCXML"
                  version="1.0" 
             initialstate="tripType">

  <state               id="tripType">
    <transition     event="tripType.done">
      <target        next="departureCity"/>
    </transition>
  </state>

  <state               id="departureCity">
    <transition     event="departureCity.done">
      <target        next="arrivalCity"/>
    </transition>
  </state>

  <state               id="arrivalCity">
    <transition     event="arrivalCity.done">
      <target        next="departureDate"/>
    </transition>
  </state>

  <state               id="departureDate">
    <transition     event="departureDate.done"
                     cond="${tripType == 'round'}">
      <target        next="arrivalDate"/>
    </transition>
    <transition     event="departureDate.done"
                     cond="${tripType == '1way'}">
      <exit />
    </transition>
  </state>

  <state               id="arrivalDate"
                    final="true" />

</scxml>
