<?xml version="1.0" ?>
<statechart>
  <semantics input_event_lifeline="whole"/>

  <datamodel>
    c = 0;
  </datamodel>

  <inport name="in">
    <event name="dial"/>
  </inport>

  <outport name="out">
    <event name="out"/>
  </outport>

  <root initial="D">
    <state id="D">
      <transition event="dial(d:int)" cond="c &lt; 10" target=".">
        <code> c += 1; </code>
        <raise event="out">
          <param expr="d"/>
        </raise>
      </transition>
    </state>
  </root>
</statechart>