<?xml version="1.0" encoding="UTF-8"?>
<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="STATE1">
  <state id="STATE1">
    <transition target="STATE2" event="Events.EVENT1"/>
    <transition target="CANCEL" event="Events.EVENT_CANCEL"/>
  </state>
  <state id="STATE2">
    <transition target="STATE3" event="Events.EVENT2"/>
    <transition target="CANCEL" event="Events.EVENT_CANCEL"/>
  </state>
  <state id="STATE3">
    <transition target="STATE4" event="Events.EVENT3"/>
    <transition target="CANCEL" event="Events.EVENT_CANCEL"/>
  </state>
  <state id="STATE4">
    <transition target="STATE5" event="Events.EVENT4"/>
    <transition target="CANCEL" event="Events.EVENT_CANCEL"/>
    <transition target="STATEY" event="Events.EVENTY"/>
  </state>
  <state id="STATE5">
    <transition target="STATE6" event="Events.EVENT5"/>
    <transition target="CANCEL" event="Events.EVENT_CANCEL"/>
    <transition target="STATE_EXTRA_1" event="Events.EVENTX"/>
  </state>
  <state id="STATE6">
    <transition target="STATE7" event="Events.EVENT6"/>
  </state>
  <state id="STATE7">
    <transition target="STATE8" event="Events.EVENT7"/>
  </state>
  <state id="STATE8">
    <transition target="STATE9" event="Events.EVENT8"/>
    <transition target="STATE9" cond="guardVarEquals(&quot;forward9&quot;)">
      <!-- order=0 -->
    </transition>
    <transition target="STATE10">
      <!-- order=1 -->
    </transition>
  </state>
  <state id="STATE9">
    <transition target="STATE10" event="Events.EVENT9"/>
    <transition target="STATE8" cond="guardVarEquals(&quot;stepBack&quot;)">
      <!-- order=0 -->
    </transition>
    <transition target="STATE7" cond="guardVarEquals(&quot;stepBackMore&quot;)">
      <!-- order=1 -->
    </transition>
    <transition target="STATE6">
      <!-- order=2 -->
    </transition>
  </state>
  <state id="STATE10">
    <transition target="STATE11" event="Events.EVENT10"/>
  </state>
  <state id="STATE11">
    <transition target="STATE12" event="Events.EVENT11"/>
    <transition target="STATE13" cond="guardVarEquals(&quot;goTo13&quot;)">
      <!-- order=0 -->
    </transition>
    <transition target="STATE14" cond="guardVarEquals(&quot;goTo14&quot;)">
      <!-- order=1 -->
    </transition>
    <transition target="STATE15">
      <!-- order=2 -->
    </transition>
  </state>
  <state id="STATE12">
    <transition target="STATE13" event="Events.EVENT12"/>
    <transition target="STATE10" cond="guardVarEquals(&quot;goBack10&quot;)">
      <!-- order=0 -->
    </transition>
    <transition target="STATE11">
      <!-- order=1 -->
    </transition>
  </state>
  <state id="STATE13">
    <transition target="STATE14" event="Events.EVENT13"/>
  </state>
  <state id="STATE14">
    <transition target="STATE15" event="Events.EVENT14"/>
    <transition target="STATE12" cond="guardVarEquals(&quot;loop12&quot;)">
      <!-- order=0 -->
    </transition>
    <transition target="STATE16">
      <!-- order=1 -->
    </transition>
  </state>
  <state id="STATE15">
    <transition target="STATE16" event="Events.EVENT15"/>
  </state>
  <state id="STATE16">
    <transition target="STATE17" cond="guardVarEquals(&quot;value1&quot;)">
      <!-- order=0 -->
    </transition>
    <transition target="STATE18" cond="guardVarEquals(&quot;value2&quot;)">
      <!-- order=1 -->
    </transition>
    <transition target="STATE19">
      <!-- order=2 -->
    </transition>
  </state>
  <state id="CANCEL">
  </state>
  <state id="STATEY">
    <transition target="STATEX" cond="guardVarEquals(&quot;value1&quot;)">
      <!-- order=0 -->
    </transition>
    <transition target="STATEZ">
      <!-- order=1 -->
    </transition>
  </state>
  <state id="STATEX">
  </state>
  <state id="STATEZ">
  </state>
  <state id="STATE17">
    <transition target="STATE20" cond="guardEventHeaderEquals(&quot;header1&quot;,&quot;foo&quot;)">
      <!-- order=0 -->
    </transition>
    <transition target="STATE16">
      <!-- order=1 -->
    </transition>
  </state>
  <state id="STATE18">
    <transition target="STATE19" cond="guardVarEquals(&quot;value3&quot;)">
      <!-- order=0 -->
    </transition>
    <transition target="STATE20">
      <!-- order=1 -->
    </transition>
  </state>
  <state id="STATE19">
    <transition target="STATE1" cond="guardVarEquals(&quot;reset&quot;)">
      <!-- order=0 -->
    </transition>
    <transition target="STATE20">
      <!-- order=1 -->
    </transition>
  </state>
  <state id="STATE20">
    <transition target="STATE5" cond="guardEventHeaderEquals(&quot;header2&quot;,&quot;bar&quot;)">
      <!-- order=0 -->
    </transition>
    <transition target="STATE1">
      <!-- order=1 -->
    </transition>
  </state>
  <state id="STATE_EXTRA_1">
    <transition target="CANCEL" event="Events.EVENT_CANCEL"/>
    <transition target="CANCEL" event="Events.EVENT_CANCEL_2"/>
  </state>
</scxml>

