jbeard4 / SCION-CORE

A minimal implementation of Statecharts in portable, embeddable JavaScript. Development moved to gitlab: https://gitlab.com/scion-scxml/core
Apache License 2.0
35 stars 9 forks source link

initial attribute processing only supports a single state id #36

Open mattoshry opened 8 years ago

mattoshry commented 8 years ago

Per 3.2 and 3.2.1 of scxml, the initial attribute is an IDREFS - one of more state ids.

The code that traverses the document, detects initial attributes and connects them to a state [2], assumes the value is a single state id.

[1] https://www.w3.org/TR/scxml/#scxml [2] https://github.com/jbeard4/SCION-CORE/blob/07e2a1e9dc7d2437933f97cb916e9f098647b5b7/lib/scion.js#L218

jbeard4 commented 6 years ago

@mattoshry Should be fixed in latest release (4.3.1). Please give it a try. Thanks.