W3C home > Mailing lists > Public > www-voice@w3.org > January to March 2013

Exiting an entire <parallel> due to an external transition

From: Gavin Kistner <phrogz@me.com>
Date: Thu, 31 Jan 2013 23:24:18 +0000 (GMT)
To: www-voice@w3.org, www-voice@w3.org
Message-id: <526223a5-4a4e-4c35-9de7-3aaecab9d160@me.com>
Consider the following:

    <scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0">
      <parallel id="p">
        <state id="s1" initial="a">
          <state id="a" />
          <state id="b" />
          <transition event="e" target="b" />
        <state id="s2" />

When initially run, this enters p/s1/a and p/s2.

Because the transition has no type attribute, it defaults to "external". (I personally think this is a terrible default, counter-intuitive to almost every use case I personally envision using SCXML for. Every editor I write will default to explicitly setting this attribute to "internal". I'd love to fork a separate thread about why this defaults to "external".)

Per the specs, external transitions find the LCCA of the transition source and target(s) and then exit and re-enter the states underneath that scxml/state. In this case the LCCA is the root scxml. It is not the 'p' because <parallel> are excluded from the LCCA test.

As such, taking the transition from s1/a to s1/b causes the machine to exit 'a', 's1', and 's2', and even 'p' itself. I find the fact that we exit 's1' reasonable (for an 'external' transition), but I find it surprising that we exit 's2' and 'p'.

Is there a strong reason for using the LCCA instead of the LCA (least common (proper) ancestor of any type)? Is there a strong reason to wish to exit all concurrent siblings (inside a parallel) when re-entering one state?
Received on Thursday, 31 January 2013 23:24:46 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:07:43 UTC