commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wait, David L HS" <>
Subject [SCXML] Assign Attribute clarification
Date Thu, 08 Feb 2007 19:53:15 GMT

I am unclear if the SCXML engine has problems with correct syntax for
the <assign> tag or if I am misreading the W3C xsd for the <assign> tag.
The W3C xsd specifies that the attributes of <assign> are "location",
"src", and "expr".  I notice that the examples in both the W3C site and
SCXML Commons site use the attribute "name" instead of "location", which
seems to be an error.  For example, the microwave-02.xml example on the
SCXML Commons site contains the following statement that apparently uses
incorrect syntax:

   <assign name="timer" expr="timer + 1"/>

(Note also that the original examples on the W3C site all use the same
apparently incorrect syntax).  When I run on the SCXML Commons
StandaloneJexlExpressions class using syntax following the W3C xsd, such

   <assign location="timer" expr="timer + 1"/>, 

the following message is printed to the console:

Feb 8, 2007 11:00:50 AM org.apache.commons.scxml.env.SimpleErrorReporter
WARNING: EXPRESSION_ERROR (java.lang.ClassCastException:

When I change the statement to the apparently wrong syntax <assign
name="timer" expr="timer+1"/> the state machine runs without error

Please clarify the correct attribute for the <assig> tag.  Be aware that
an scxml editing tool built using the Eclipse Modeling Framework and the
W3C xsd file generates scxml that produces the error message noted
earlier.  My first impression is that the scxml editor built using the
EMF produces the correct syntax for the <assign> tag.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message