- From: Jacob Beard <jake@jacobeanrnd.com>
- Date: Wed, 5 Jul 2017 10:49:37 -0400
- To: "www-voice@w3.org (www-voice@w3.org)" <www-voice@w3.org>
- Message-Id: <150048BE-EDFF-4CE6-8168-B8FE337D92EF@jacobeanrnd.com>
Hello, In the SCXML IRP test236.txml, there is a final state that contains an <onexit> action: <final id="subFinal"> <onexit> <send target="#_parent" event="childToParent"/> </onexit> </final> https://www.w3.org/Voice/2013/scxml-irp/236/test236.txml <https://www.w3.org/Voice/2013/scxml-irp/236/test236.txml> In test236, it appears that the invoked session is not cancelled, as state s0 is not exited before the invoking session receives the done.invoke.id event. My question is, how can the onexit handler in state subFinal fire under this scenario? My main assumption is that the only method to trigger the exit handler of a final state is to cancel the invoked session. This is described in the spec: ... if the invoking state machine exits the state containing the invocation before it receives the done.invoke.id event, it cancels the invoked session. The method for doing this is platform-specific. However, when it is cancelled, the invoked session must exit at the end of the next microstep. The Processor must execute the <onexit> handlers for all active states in the invoked session, but it must not generate the done.invoke.id event. Once it cancels the invoked session, the Processor must ignore any events it receives from that session. In particular it must not not insert them into the external event queue of the invoking session. To cancel the invoked session, the invoking session must take a transition out of the state containing the <invoke> before the invoking session receives the done.invoke.id event, as described in the spec: If the invoking session takes a transition out of the state containing the <invoke> before it receives the 'done.invoke.id' event, the SCXML Processor must automatically cancel the invoked component and stop its processing. The cancel operation must act as if it were the final <onexit> handler in the invoking state. In test236, it appears that the invoked session is not cancelled, as state s0 is not exited before the invoking session receives the done.invoke.id event, therefore the onexit handler of state subFinal should not fire. Is there a way for the onexit handler of a final state to fire, other than by canceling the invoked session? I would appreciate your guidance on the expected behavior of this test case. Thank you for looking into this, Jacob Beard
Received on Wednesday, 5 July 2017 14:50:09 UTC