commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Akolkar <rahul.akol...@gmail.com>
Subject Re: [SCXML] Problem in using the assign action
Date Sat, 16 Jul 2011 22:28:29 GMT
On Sat, Jul 16, 2011 at 6:14 PM, dark.rider85 <dark.rider85@yahoo.de> wrote:
> Hi!
> I am new in using SCXML and wanted to test the assign action.
> I created a data model with a data element which has the id "dataID1".
> The complete datamodel element looks like the following:
>
> <datamodel>
> <data id="dataID1">
> <num>0</num>
> </data>
> </datamodel>
>
> Next, I put a state with an onEntry consisting of one assign action with the
> location of the data element and an expression of 3. That is,
>
> ...
> <onentry>
> <assign location="dataID1/num" expr="3"/>
> </onentry>
> ...
>
> When I execute the code I always get the following logging information:
> EXPRESSION_ERROR (eval('dataID1/num'):Double coercion exception): ...
>
> What am I doing wrong? Can someone help me?
>
<snip/>

See "Assignments" section towards the bottom of this page:

  http://commons.apache.org/scxml/guide/datamodel.html

If you want to use XPath as the EL, you'll need to use the context and
evaluator here [1], with an example here:

  http://svn.apache.org/repos/asf/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/env/xpath/example-02.xml

-Rahul

[1] http://svn.apache.org/repos/asf/commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/env/xpath/


> Thanks in advance!
>
> Regards
>
>

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


Mime
View raw message