I like my way the best but between yours I like 1 better than 2. Not sure if I like 1 or 2 though so I might try to find a better suited state machine.
Thanks, Shawn > Date: Mon, 10 Dec 2007 12:05:16 -0500 > From: [EMAIL PROTECTED] > To: [email protected] > Subject: Re: SCXML > > On 12/10/07, Shawn Garner <[EMAIL PROTECTED]> wrote: > > > > Is there a way to declare a global state transition? > > <state id="*"> > > <transition event="userLeave" target="GetPlayers"/> > > </state> > > Not in the way you have above (I understand that was only for > clarifying intent). But, there are atleast two ways to achieve this. > Say, you have foo.xml as follows: > > <scxml initialstate="s1" ...> > > <state id="s1"> > <!-- Body of s1 ... --> > </state> > > <!-- More ... --> > > </scxml> > > You could: > > 1) Add a composite parent state to hold the global transition, so > modify foo.xml like so: > > <scxml initialstate="global" ...> > > <state id="global"> > <transition event="userLeave" target="GetPlayers"/> > > <initial> > <transition target="s1"/> > </intial> > > <state id="s1"> > <!-- Body of s1 ... --> > </state> > > <!-- More ... --> > > </state> > > </scxml> > > 2) If foo.xml can't be changed etc. create a bar.xml SCXML document > that decorates foo.xml like so: > > <scxml initialstate="global" ...> > > <state id="global" src="foo.xml"> > <transition event="userLeave" target="GetPlayers"/> > </state> > > </scxml> > > -Rahul > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > _________________________________________________________________ Share life as it happens with the new Windows Live. http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_122007
