jbeard4 / SCION

SCXML/Statecharts in JavaScript, moved to gitlab: https://gitlab.com/scion-scxml/scion
https://scion.scxml.io
Apache License 2.0
149 stars 29 forks source link

should reject an scxml document containing foreach without @array #383

Open mattoshry opened 7 years ago

mattoshry commented 7 years ago

Per [1], foreach/@array is required.

SCION should reject the following:

<scxml xmlns="http://www.w3.org/2005/07/scxml"
  version="1.0">

<state id="uber">

  <onentry>
    <!-- missing array -->
    <foreach item="it">
      <log expr="'bug'"/>
    </foreach>
  </onentry>

  <transition event="*" target="fail">
    <log expr="'unhandled event ' + JSON.stringify(_event)"/>
  </transition>

</state>

<final id="fail"/>

</scxml>

[1] https://www.w3.org/TR/scxml/#foreach