On 16/02/2009, Ouyang, Landon - ES/RDR -Gil <[email protected]> wrote: > The link to the source: > http://svn.apache.org/repos/asf/commons/proper/scxml/trunk/ > > appears broken.
The main SVN server is currently down. Possibly won't be back for 24 hours. > Any other suggestions of where to find example code?? The EU SVN mirror: http://svn.eu.apache.org/repos/asf/commons/proper/scxml/trunk/ Unless the code is very recent, you should also find it in a source archve. > > -- > Landon Ouyang > Senior Design Engineer > ITT Electronics Systems, Radar Systems - Gilfillan > 7821 Orion Ave, > Van Nuys, CA 91406 > (818) 901-2982 > > > -----Original Message----- > From: Rahul Akolkar [mailto:[email protected]] > > Sent: Monday, February 16, 2009 9:32 AM > To: Commons Users List > Subject: Re: [SCXML] Need help returning from substate > > On Mon, Feb 16, 2009 at 4:01 AM, Ouyang, Landon - ES/RDR -Gil > <[email protected]> wrote: > > Where are the JUnit test suites located? Can you give me a link? > > > <snip/> > > Follow the link to the source in the overview on the building page: > > http://commons.apache.org/scxml/building.html > > I'm traveling and the repository browsing isn't working for me, so > can't provide direct link to the individual tests ATM. > > -Rahul > > > > > -- > > Landon Ouyang > > Senior Design Engineer > > ITT Electronics Systems, Radar Systems - Gilfillan > > 7821 Orion Ave, > > Van Nuys, CA 91406 > > (818) 901-2982 > > > > > > -----Original Message----- > > From: Rahul Akolkar [mailto:[email protected]] > > Sent: Friday, February 13, 2009 3:59 PM > > To: Commons Users List > > Subject: Re: [SCXML] Need help returning from substate > > > > On Fri, Feb 13, 2009 at 4:48 PM, Ouyang, Landon - ES/RDR -Gil > > <[email protected]> wrote: > >> Background: I have several states that need to call the same external > substate machine. Once the substate machine has finished I need it to return > to the calling state. > >> > >> Question: How can I get the substate machine to return to the calling > state without explicitly naming the calling state in the transition? > >> > > <snip/> > > > > Rather than returning to calling state, think about it as waiting for > > the .done event related to the src'ed in state machine. Then the > > troublesome transition moves from the src'ed in state machine to the > > <state> with the src attribute. In terms of your example ... > > > > > >> I have found bits and pieces in the archives and online but no good > examples or full explanations. > >> Any pointers to online documentation for this would also be helpful. > Thanks. > >> > >> Code: > >> I would like to return from the password.xml substate to the calling > state (SaveButton, ReloadButton, etc). The tag <transition event="e_Done" > target="* Back to Calling State* " /> specifies a specific state However, > that state depends on the calling state. How do I get it to return to the > calling state automatically? > >> > >> <state id="SaveButton" src="Password.xml" > > >> <transition event="e_Done" target="SteadyState" /> > >> </state> > >> <state id="ReloadButton" src="Password.xml" > > >> <transition event="e_Done" target="SteadyState" /> > >> </state> > >> > > <snap/> > > > > When the submachine in Password.xml runs to completion (which means it > > needs to have one or more <final> states), the $parentstate.done event > > will be generated (so in the above cases, SaveButton.done and > > ReloadButton.done respectively). > > > > <state id="SaveButton" src="Password.xml" > > > <transition event="e_Done" target="SteadyState" /> > > <!-- Take a transition on SaveButton.done when Password.xml runs > > to completion --> > > </state> > > <state id="ReloadButton" src="Password.xml" > > > <transition event="e_Done" target="SteadyState" /> > > <!-- Take a transition on ReloadButton.done when Password.xml runs > > to completion --> > > </state> > > > > This assumes that the state "ControlGranted" in the submachine below > > is changed to a final state (and is reached so the .done internal > > events are generated). > > > > There are a couple of test cases in the JUnit test suite that use this > > pattern, in case you want to look at a complete example. > > > > -Rahul > > > > > >> > >> Password.xml > >> <scxml xmlns="http://www.w3.org/2005/07/scxml" > >> xmlns:my="http://www.ttt.com" version="1.0" > initialstate="PasswordCheck"> > >> <state id="PasswordCheck" > > >> <onentry> > >> <my:StateLog/> > >> <my:PasswordCheck/> > >> </onentry> > >> <transition event="e_Done" target="SteadyState" /> > >> <transition event="e_validate" target="PasswordValid" /> > >> <transition event="e_allow" target="ControlGranted" /> > >> </state> > >> <state id="PasswordValid" > > >> <onentry> > >> <my:StateLog/> > >> <my:PasswordValid/> > >> </onentry> > >> <transition event="e_allow" target="ControlGranted" /> > >> <transition event="e_Done" target=" SteadyState " /> > >> </state> > >> <state id="ControlGranted" > > >> <onentry> > >> <my:StateLog/> > >> <my:ControlGranted/> > >> </onentry> > >> <transition event="e_Done" target="* Back to Calling State* > " /> > >> </state> > >> </scxml> > >> > >> > >> -- > >> Landon Ouyang > >> Senior Design Engineer > >> ITT Electronics Systems, Radar Systems - Gilfillan > >> 7821 Orion Ave, > >> Van Nuys, CA 91406 > >> (818) 901-2982 > >> > >> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > > > This e-mail and any files transmitted with it may be proprietary and are > intended solely for the use of the individual or entity to whom they are > addressed. If you have received this e-mail in error please notify the sender. > > Please note that any views or opinions presented in this e-mail are solely > those of the author and do not necessarily represent those of ITT > Corporation. The recipient should check this e-mail and any attachments for > the presence of viruses. ITT accepts no liability for any damage caused by > any virus transmitted by this e-mail. > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
