You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Apache Wiki <wi...@apache.org> on 2007/02/06 11:32:54 UTC

[Jakarta-commons Wiki] Update of "SCXML/FrequentlyAskedQuestions" by WolfgangFrech

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-commons Wiki" for change notification.

The following page has been changed by WolfgangFrech:
http://wiki.apache.org/jakarta-commons/SCXML/FrequentlyAskedQuestions

The comment on the change is:
added entry on inital sub-state in extracted component of parallel

------------------------------------------------------------------------------
  
  However, this has been implemented in trunk, so with the next release of Commons SCXML the SCXMLExecutor instances will be Serializable. Listeners and other associated user-supplied bits are expected to be Serializable.
  
+ 
+ ==== How do I specify the initial substate when extracting a state descending from a <parallel> element into an external file? ====
+ 
+ Use the initialstate attribute of the scxml element in the external file, and delete the initial pseudostate element with the transition to the initial substate.
+ 
+ Example definition before extraction:
+ {{{
+ ...
+ <parallel>
+   <state id="a">
+   <initial>
+     <transition target="a.initial"/>
+   </initial>
+   <state id="a.initial>
+   ...
+ }}}
+ 
+ Example definition after extraction:
+ {{{
+ ...
+ <parallel>
+   <state id="a" src="a.scxml"> 
+ }}}
+ 
+ Extracted definition:
+ {{{
+ ...
+ <scxml
+  ...
+  initialstate="a.initial">
+   <state id="a">
+     <state id="a.initial">
+     ... 
+ }}}
+ 
+ Ellipsis ... marks omitted elements or attributes.
+ 
+ Reason for this entry: I found it a bit confusing that there are two ways to express "initiality" of a (sub-)state, one by declaring initialstate, one by adding an operation, that is an unconditional initial transition.  This is even more confusing during the "extract" refactoring, because I had to switch from the operational to the declarative method.
+ 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org