You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Micka <mi...@gmail.com> on 2011/01/27 21:25:45 UTC

SCXML : vs JEXL FUNCTION

Hi,

I'm always amazing about the SCXML.

I'm using JEXL in my SCXML project and when i discovered all the thing that
JEXL can bring ( like custom function ) , I was wondering what is the
purpose to use <send> or <invoke> tag in the scxml file.

Is it possible that someone explain me ?



By the way, thank you for this amazing project !


----------------------------------------------------------------------------------
if my english is not good enough for you to understand.


Why should I use :
org.apache.commons.scxml.EventDispatcher class with the :
public void send(String sendId, String targe, String type, String event,
        Map params, Object hints, long delay, List externalNodes) ;

instead of  :
JEXL.setFunctions(funcs); ?

Thanks you,

Re: SCXML : vs JEXL FUNCTION

Posted by Rahul Akolkar <ra...@gmail.com>.
On Thu, Jan 27, 2011 at 3:25 PM, Micka <mi...@gmail.com> wrote:
> Hi,
>
> I'm always amazing about the SCXML.
>
> I'm using JEXL in my SCXML project and when i discovered all the thing that
> JEXL can bring ( like custom function ) , I was wondering what is the
> purpose to use <send> or <invoke> tag in the scxml file.
>
> Is it possible that someone explain me ?
>
>
>
> By the way, thank you for this amazing project !
>
>
> ----------------------------------------------------------------------------------
> if my english is not good enough for you to understand.
>
>
> Why should I use :
> org.apache.commons.scxml.EventDispatcher class with the :
> public void send(String sendId, String targe, String type, String event,
>        Map params, Object hints, long delay, List externalNodes) ;
>
> instead of  :
> JEXL.setFunctions(funcs); ?
>
<snip/>

Custom functions in JEXL should be used to make the expression
language more effective for the SCXML document -- so utility functions
for quick, local calculations and transforms.

The use of <send> is a standard feature in SCXML, and its purpose is
to initiate and maintain communication with other processes (local or
remote). Anything to do with such "external communications" should be
modeled as <send> and thereby implemented using the EventDispatcher.

-Rahul


> Thanks you,
>

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