- From: Gavin Kistner <gkistner@nvidia.com>
- Date: Mon, 27 Oct 2014 22:03:59 +0000
- To: "www-voice@w3.org" <www-voice@w3.org>
- CC: Chris Nuernberger <chrisn@nvidia.com>
I still, disturbingly, struggle to gain intuition on section 3.13 of the spec. Please help me by clarifying: <scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"> <state id="innerwrap"> <transition event="foo"><log label="Should I run?"/></transition> <state id="A"><transition event="foo" target="B" type="internal"/></state> <state id="B"/> </state> </scxml> My intuition tells me that a "foo" event should be 'consumed' by the inner transition and not 'bubble' out. That the outer log message should not run. [Q1] Is this correct? It is, I think, confirmed by this text: "Definition: A transition T is optimally enabled by event E in atomic state S if a) T is enabled by E in S and b) no transition that precedes T in document order in T's source state is enabled by E in S and c) no transition is enabled by E in S in any descendant of T's source state." Part (c) prevents the targetless transition above from executing. If this transition were after the states, then part (b) would prevent it from executing. Yes? Now, what about parallel? <scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"> <parallel id="outerwrap"> <transition event="foo"><log label="Should I run?"/></transition> <state id="inner1"> <state id="A1"><transition event="foo" target="B1" type="internal"/></state> <state id="B1"/> </state> <state id="inner2"> <state id="A2"><transition event="foo" target="B2" type="internal"/></state> <state id="B2"/> </state> </parallel> </scxml> [Q2] If "foo" occurs, should the log message occur? The same spec above seems to tell me that it should not, as long as the transition in inner1 is present. Even though inner2 does not consume the event, the fact that any child of the parallel was enabled by it means that the outer targetless transition is preempted per (c). And finally, for good measure: [Q3] If "foo" occurs, should both B1 and B2 be entered? My intuition tells me yes, because that's what parallel is all about, yo. I think this is supported because part (b) of the above quoted definition does not apply. One transition precedes the other in document order, but they are not part of the same hierarchy when we consider the source state of each transition. Thanks for your help. :) ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -----------------------------------------------------------------------------------
Received on Wednesday, 29 October 2014 21:06:53 UTC