W3C home > Mailing lists > Public > www-voice@w3.org > October to December 2012

Re: Use of fragment in URI to specifi initial state

From: David Junger <tffy@free.fr>
Date: Fri, 2 Nov 2012 08:42:40 +0100
To: www-voice@w3.org
Message-Id: <D9ABD968-7A24-4012-9B3A-949EBBC8BEE0@free.fr>
Le 2 nov 2012 ΰ 00:08, DOLECEK Ales a ιcrit :

>   suppose <invoke type=“http://www.w3.org/TR/scxml/“ src=“http://example/other.xml#s2“/>. The content of the xml source would be:
>  
> <scxml>
>   <state id=“s1“/>
>   <state id=“s2“/>
> </scxml>
>  
> According to current draft the processor should start interpretation by entering s1 via (implicit) initial transition.
>  
> Would not it be usefull to allow start by entering s2 specifed in the frament?
>  
> This would allow to chose the default entry state externally, even if it is not possible to choose multiple parallel states this way.

The main problem I see there is that SCXML sessions are supposed to be black boxes that only communicate with the outside world (even invoked sessions) through events, and it's not terribly difficult to have a transition in your initial state that takes you to an arbitrary state specified by an init event, like this:

<transition event="init" targetexpr="_event.data.id" />

And the transition might be more complex, e.g. to handle more or invalid init data, and a non-SCXML invoked service could accept an init event too.

Also, the URI fragment is not necessarily sent to the server in HTTP requests, which may be an issue if the target is a service running on the server.

			David
Received on Friday, 2 November 2012 07:43:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 2 November 2012 07:43:14 GMT