<taskModel about="GPS trainer" xmlns="http://ce.org/cea-2018">

  <task id="AddNewAddress">
    <subtasks id="add">
      <step name="open" task="OpenNewEntry"/>
      <step name="enter" task="EnterAddress"/>
      <step name="save" task="SaveEntry"/>
      <binding slot="$save.addr" value="$enter.addr"/>
    </subtasks>
  </task>

  <task id="OpenNewEntry">
    <subtasks id="open">
      <step name="book" task="ClickAddressBook"/>
      <step name="new" task="ClickNewEntry"/>
    </subtasks>
  </task>
  
  <task id="ClickAddressBook" /> 
  <task id="ClickNewEntry" /> 
  <task id="ClickSave" /> 
  <task id="ClickList" /> 
  <task id="ClickSearch" /> 
  
  
  <task id="EnterAddress">
    <output name="addr" type="string"/>
  	<subtasks id="enter">
  	  <step name="type" task="TypeAddress" />
  	  <binding slot="$this.addr" value="$type.addr"/>
  	</subtasks>
 </task>
  
  <task id="SaveEntry">
  	<input name="addr" type="string"/>
  	<subtasks id="save">
  	  <step name="click" task="ClickSave" />
  	</subtasks>
  </task>
  
  <task id="NewRoute">
    <subtasks id="load">
      <step name="open" task="OpenRouteMenu" />
      <step name="find" task="FindAddress" />
      <step name="load" task="LoadRoute" />
    </subtasks>
  </task>
  
  <task id="OpenRouteMenu">
    <subtasks id="open">
      <step name="open" task="ClickNewRoute" />
    </subtasks>
  </task>
  
  <task id="FindAddress">
    <subtasks id="type">
      <step name="type" task="TypeAddress" />
     </subtasks>
    <subtasks id="search">
      <step name="search" task="SearchAddress" />      
    </subtasks>
    <subtasks id="list">
      <step name="list" task="ListAddress" />      
    </subtasks>
  </task>
  
  <task id="LoadRoute">
    <subtasks id="load">
        <step name="open" task="ClickLoadRoute" />
    </subtasks>
  </task>
  
  
  <task id="TypeAddress">
    <input name="addr" type="string"/>
  </task>
  
  <task id="SearchAddress">
    <subtasks id="search">
      <step name="query" task="EnterQuery" />
      <step name="list" task="PickFromList" />
    </subtasks>
  </task>
  
  <task id="ListAddress">
   	<input name="addr" type="string"/>
  </task>
  
  <task id="EnterQuery">
    <input name="query" type="string"/>
  </task>
  
  <task id="PickFromList">
    <input name="addr" type="string"/>
  </task>
  
  <task id="ClickNewRoute" />
  <task id="ClickLoadRoute" />
  <task id="ClickAssistance" />
  <task id="ClickMainMenu" />
  <task id="ClickStartOver" />

  <script init="true">

    // model of address book stored info

    var home = "436 Chestnut Ridge Rd",
        apt = "51 Dover Street",
        school = "100 Institute Road";

    var catalog = new Array( home, apt, school );
    
    function listaddrs () {
       var result = "";
       for (i = 0; i &lt; catalog.length; i++) {
            result += catalog[i];
            result += "\n";
          }
       return result;
    }
    
  </script>



</taskModel>