Hello,

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
as

   <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
onError
WARNING: EXPRESSION_ERROR (java.lang.ClassCastException:
java.lang.Integer): 

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

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.


--David

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to