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 2006/03/03 23:37:49 UTC
svn commit: r382950 -
/jakarta/commons/sandbox/scxml/trunk/xdocs/guide/scxml-documents.xml
Author: rahul
Date: Fri Mar 3 14:37:48 2006
New Revision: 382950
URL: http://svn.apache.org/viewcvs?rev=382950&view=rev
Log:
Add section on parallelism in state charts.
A nice demonstration will be to use parallelism to execute multiple Shale dialogs (at the same time) -- another todo.
Modified:
jakarta/commons/sandbox/scxml/trunk/xdocs/guide/scxml-documents.xml
Modified: jakarta/commons/sandbox/scxml/trunk/xdocs/guide/scxml-documents.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/xdocs/guide/scxml-documents.xml?rev=382950&r1=382949&r2=382950&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/xdocs/guide/scxml-documents.xml (original)
+++ jakarta/commons/sandbox/scxml/trunk/xdocs/guide/scxml-documents.xml Fri Mar 3 14:37:48 2006
@@ -200,6 +200,70 @@
</section>
+ <section name="Parallel">
+
+ <p>This is a wrapper element that encapsulates multiple
+ <state>s -- or state machines, since in the section on
+ composite states we took a look at the "recursion" or
+ "nesting" for the <state> element, whereby each state
+ can become a state machine in its own right -- that are "active"
+ at the same time. Here is
+ a relevant snippet (the entire version of this
+ <a href="http://svn.apache.org/repos/asf/jakarta/commons/sandbox/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/microwave-02.xml">parallel microwave example</a>
+ ):</p>
+
+ <pre>
+ <!--
+ ... begin snippet ...
+ -->
+
+ <state id="microwave">
+ <parallel id="parts">
+ <state id="oven">
+
+ <!-- state machine for "oven" (idle/cooking) -->
+
+ </state>
+
+ <state id="oven">
+
+ <!-- state machine for "door" (open/closed) -->
+
+ </state>
+ </parallel>
+ </state>
+
+ <!--
+ ... end snippet ...
+ -->
+ </pre>
+
+ <p>
+ <ul>
+ <li>The state "microwave" is an example of a "orthogonal"
+ state (one that owns a parallel).</li>
+ <li>It contains two state machines, "oven" and "door". These
+ state machines are "active" at the same time. These are
+ known as "regions".
+ </li>
+ <li>Transition may occur within a region or from a region to
+ outside the <parallel> (see below), but never from
+ one region to another ("across" regions).
+ </li>
+ <li>There is no need for an <initial> element within
+ a <parallel></li>
+ <li>The state machine must enter all regions at the same time,
+ and an outbound transition out of the <parallel>
+ from any region causes the state machine to exit all
+ regions.</li>
+ <li>When all regions reach a "final" state, an "id.done" event
+ is fired, where "id" is the id of the parent <parallel>
+ </li>
+ </ul>
+ </p>
+
+ </section>
+
<section name="Hello World with a custom action">
<p>The Commons SCXML implementation allows you to register custom actions.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org