commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Berg, T.W. (Tom) van den" <tom.vandenb...@tno.nl>
Subject [SCXML] Reusing statediagrams through the src attribute in state
Date Mon, 21 Jul 2008 13:59:25 GMT
I would like to reuse a statediagram in an overall state diagram. The
src attribute in the state tag seems to suggest this is possible.
For example the main state.xml file would contain:
 
----
 
 <state id="Composite1" src="include.xml">
  <state id="finalState">
   <transition target="Composite2"/>
  </state>
 </state>

 <state id="Composite2" src="include.xml">
  <state id="finalState">
   <transition target="Composite3"/>
  </state>
 </state>

 <state id="Composite3" src="include.xml">
  <state id="finalState">
  </state>
 </state>
 
----
 
And the (simplified) include.xml looks like:
 
<scxml xmlns="http://www.w3.org/2005/07/scxml
<http://www.w3.org/2005/07/scxml> "
       xmlns:rti="http://rti.actions/CUSTOM <http://rti.actions/CUSTOM>
"
       version="1.0"
       initialstate="sp">
 
 <state id="sp">
  <transition target="finalState"/>
 </state>
</scxml>


----
 
However, this example does not work.
 
I get the following error:
21-jul-2008 15:50:24 org.apache.commons.scxml.io.ModelUpdater
logAndThrowModelError
SEVERE: Initial state null or not a descendant of state with ID
"Composite1"
 
Does nesting and state reuse work this way?
What are alternate ways to reuse state diagrams?
 
-- Tom

This e-mail and its contents are subject to the DISCLAIMER at http://www.tno.nl/disclaimer/email.html

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message