You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ra...@apache.org on 2005/08/25 00:08:38 UTC
svn commit: r239950 - in
/jakarta/commons/sandbox/scxml/trunk/src/test/java/org/apache/commons/scxml:
model/actions-test.xml transitions-01.xml
Author: rahul
Date: Wed Aug 24 15:08:35 2005
New Revision: 239950
URL: http://svn.apache.org/viewcvs?rev=239950&view=rev
Log:
Updated a couple of samples used by the test cases.
Modified:
jakarta/commons/sandbox/scxml/trunk/src/test/java/org/apache/commons/scxml/model/actions-test.xml
jakarta/commons/sandbox/scxml/trunk/src/test/java/org/apache/commons/scxml/transitions-01.xml
Modified: jakarta/commons/sandbox/scxml/trunk/src/test/java/org/apache/commons/scxml/model/actions-test.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/test/java/org/apache/commons/scxml/model/actions-test.xml?rev=239950&r1=239949&r2=239950&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/test/java/org/apache/commons/scxml/model/actions-test.xml (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/test/java/org/apache/commons/scxml/model/actions-test.xml Wed Aug 24 15:08:35 2005
@@ -35,7 +35,7 @@
event="croak" namelist="drink eat" hints="h2o bzz"
delay="1000" />
<cancel sendId="send12345"/>
- <log expr="leaving" />
+ <log expr="leaving" label="entry001" />
<exit expr="later" namelist="freddy" />
</onentry>
</state>
Modified: jakarta/commons/sandbox/scxml/trunk/src/test/java/org/apache/commons/scxml/transitions-01.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/test/java/org/apache/commons/scxml/transitions-01.xml?rev=239950&r1=239949&r2=239950&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/test/java/org/apache/commons/scxml/transitions-01.xml (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/test/java/org/apache/commons/scxml/transitions-01.xml Wed Aug 24 15:08:35 2005
@@ -17,65 +17,142 @@
<scxml xmlns="http://www.w3.org/2005/01/SCXML"
version="1.0"
initialstate="ten">
-
- <state id="ten">
- <transition event="ten.done">
- <target next="twenty"/>
- </transition>
- </state>
-
- <state id="twenty">
-
- <initial>
- <transition>
- <target next="twenty_one"/>
- </transition>
- </initial>
-
- <onentry>
- <log expr="In twenty" label="entry001" />
- </onentry>
-
- <state id="twenty_one">
- <transition event="twenty_one.done">
- <target next="twenty_two"/>
- </transition>
- </state>
- <state id="twenty_two">
- <transition event="twenty_two.done">
- <target next="thirty"/>
- </transition>
+ <!-- Start with a simple state -->
+ <state id="ten">
+ <transition event="ten.done">
+ <target next="twenty"/>
+ </transition>
</state>
- </state>
-
- <state id="thirty">
+ <!-- Follow up with a composite state -->
+ <state id="twenty">
- <parallel>
-
- <state id="thirty_one">
- <onentry>
- <log expr="Entering thirty_one" label="entry002" />
- </onentry>
- </state>
+ <initial>
+ <transition>
+ <target next="twenty_one"/>
+ </transition>
+ </initial>
- <state id="thirty_two">
<onentry>
- <log expr="Entering thirty_two" label="entry003" />
+ <log expr="In twenty" />
</onentry>
- </state>
- <state id="thirty_three">
- <onentry>
- <log expr="Entering thirty_three" label="entry004" />
- </onentry>
- </state>
+ <state id="twenty_one">
+ <transition event="twenty_one.done">
+ <target next="twenty_two"/>
+ </transition>
+ </state>
+
+ <state id="twenty_two">
+ <transition event="twenty_two.done">
+ <target next="thirty"/>
+ </transition>
+ </state>
+
+ </state>
- </parallel>
+ <!-- Finally, try an orthogonal state -->
+ <state id="thirty">
- </state>
+ <parallel id="thirties_parallel">
- <state id="forty" final="true" />
+ <!-- The first (of three) regions in thirties_parallel -->
+ <state id="thirty_one">
+
+ <initial>
+ <transition>
+ <target next="thirty_one_child_one"/>
+ </transition>
+ </initial>
+ <onentry>
+ <log expr="Entering thirty_one" />
+ </onentry>
+ <transition event="thirty_one.done">
+ <target next="forty"/>
+ </transition>
+
+ <state id="thirty_one_child_one">
+ <onexit>
+ <log expr="Exiting thirty_one_child_one" />
+ </onexit>
+ <transition event="thirty_one_child_one.done">
+ <target next="thirty_one_child_two"/>
+ </transition>
+ </state>
+
+ <state id="thirty_one_child_two">
+ <onexit>
+ <log expr="Exiting thirty_one_child_two" />
+ </onexit>
+ </state>
+
+ </state>
+
+ <!-- The second (of three) regions in thirties_parallel -->
+ <state id="thirty_two">
+
+ <initial>
+ <transition>
+ <target next="thirty_two_child_one"/>
+ </transition>
+ </initial>
+ <onentry>
+ <log expr="Entering thirty_one" />
+ </onentry>
+
+ <state id="thirty_two_child_one">
+ <onexit>
+ <log expr="Exiting thirty_two_child_one" />
+ </onexit>
+ <transition event="thirty_two_child_one.done">
+ <target next="thirty_two_child_two"/>
+ </transition>
+ </state>
+
+ <state id="thirty_two_child_two">
+ <onexit>
+ <log expr="Exiting thirty_two_child_two" />
+ </onexit>
+ </state>
+
+ </state>
+
+ <!-- The third (of three) regions in thirties_parallel -->
+ <state id="thirty_three">
+
+ <initial>
+ <transition>
+ <target next="thirty_three_child_one"/>
+ </transition>
+ </initial>
+ <onentry>
+ <log expr="Entering thirty_three" />
+ </onentry>
+
+ <state id="thirty_three_child_one">
+ <onexit>
+ <log expr="Exiting thirty_three_child_one" />
+ </onexit>
+ <transition event="thirty_three_child_one.done">
+ <target next="thirty_three_child_two"/>
+ </transition>
+ </state>
+
+ <state id="thirty_three_child_two">
+ <onexit>
+ <log expr="Exiting thirty_three_child_two" />
+ </onexit>
+ </state>
+
+ </state>
+
+ </parallel>
+
+ </state>
+
+ <!-- Declare victory -->
+ <state id="forty" final="true" />
</scxml>
+
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org