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

Re: bad initial target in the SCXML document example

From: David Junger <tffy@free.fr>
Date: Wed, 13 Feb 2013 11:33:08 +0100
Message-Id: <77F3250C-12D7-485F-AD23-DA72C37132D2@free.fr>
To: "VBWG Public (www-voice@w3.org)" <www-voice@w3.org>
Le 13 feb 2013 à 10:01, spam.spam.spam.spam@free.fr a écrit :

> In the G.3 [1] section, I can read:
> '<state id="engine">
>      <transition target="off"/>'
> As this is a transition without condition or event, I guess that this is an initial transition.

No. <initial> transitions are taken during the entry step of a microstep, whenever their parent state is entered and only if none of its children states is a target in the current microstep; moreover, they are not eligible to be enabled during the transition selection step, they cannot have a condition or event, they must have a target and that target must be internal. So while they work internally like transitions, they are restricted and not really transitions from the general SC's point of view.

On the other hand, there is an eventless microstep before popping events from the queues. An eventless and inconditional transition like the one you show may have external targets, be ignored if a previous eventless transition has a true condition, or preempted by another eventless transition, and it may be targetless too. So they work just like other transitions except they don't need an event and have priority over those that do.

In the example you cite, there would be no practical difference between the eventless transition shown and an <initial> transition. But it's a razor-thin edge case.

Received on Wednesday, 13 February 2013 10:33:36 UTC

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