You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "dark.rider85" <da...@yahoo.de> on 2011/07/17 00:14:45 UTC

[SCXML] Problem in using the assign action

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?

Thanks in advance!

Regards


Re: [SCXML] Call a Web Service

Posted by Rahul Akolkar <ra...@gmail.com>.
On Fri, Sep 2, 2011 at 5:09 AM, dark.rider85 <da...@yahoo.de> wrote:
> Hi!
> I was trying to search for a possibility to call a web service out of SCXML.
> I assumed the send command would be the action to use for this intention but
> I was not able to understand how it should work. In the W3C Working Draft
> there is a description of the Send command. A valid type also can be a HTTP
> URL using for Web Services. But how do I call a web service using the send
> command? Is it possible? Or is there any example code which I can consult?
>
<snip/>

Provide an EventDispatcher [1] implementation that calls the web
service keying off the appropriate type on the <send>. Bit more on
that here [2].

-Rahul

[1] http://commons.apache.org/scxml/apidocs/org/apache/commons/scxml/EventDispatcher.html
[2] http://commons.apache.org/scxml/guide/core-engine.html


> Thanks in advance for any help!
>
> Best regards
>

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


[SCXML] Call a Web Service

Posted by "dark.rider85" <da...@yahoo.de>.
Hi!
I was trying to search for a possibility to call a web service out of 
SCXML. I assumed the send command would be the action to use for this 
intention but I was not able to understand how it should work. In the 
W3C Working Draft there is a description of the Send command. A valid 
type also can be a HTTP URL using for Web Services. But how do I call a 
web service using the send command? Is it possible? Or is there any 
example code which I can consult?

Thanks in advance for any help!

Best regards

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


Re: [SCXML] Problem in using the assign action

Posted by Rahul Akolkar <ra...@gmail.com>.
On Sat, Jul 16, 2011 at 6:14 PM, dark.rider85 <da...@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