<?xml version="1.0"?>
<memory xmlns:al="http://www.logilab.org/namespaces/Narval/1.2">

<al:test recipe='test.test-006' category='basic'>
  <al:description lang="en">Checks that an element arriving in memory can validate a transition</al:description>
</al:test>

<al:recipe name='test-006' group='test' start_step='step1' end_step='step3'>

 <al:step id='step1' type='action' target='Selftest.NOP'/>
 <al:step id='step2' type='action' target='Selftest.NOP'/>
 <al:step id='step3' type='action' target='Selftest.NOP'/>
 <al:step id='step2bis' type='action' target='Selftest.NOP'/>
 <al:step id='step3bis' type='action' target='Selftest.NOP'/>
 <al:step id='step4bis' type='action' target='Selftest.produce_element'/>
 <al:step id="end" type='action' target='Selftest.NOP'/>
 
 <al:transition id='transition1'>
  <al:in idref='step1'/>
  <al:out idref='step2'/>
  <al:out idref='step2bis'/>
 </al:transition>

 <al:transition id='transition2'>
  <al:in idref='step2'/>
  <al:out idref='step3'/>
  <al:condition><al:match>isinstance(elmt, Element)</al:match></al:condition>
 </al:transition>

 <al:transition id='transition2bis'>
  <al:in idref='step2bis'/>
  <al:out idref='step3bis'/>
 </al:transition>

 <al:transition id='transition3bis'>
  <al:in idref='step3bis'/>
  <al:out idref='step4bis'/>
 </al:transition>

 <al:transition id='transitionfinale'>
  <al:in idref='step3'/>
  <al:in idref='step4bis'/>
  <al:out idref='end'/>
 </al:transition>

</al:recipe>

</memory>
