You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Yasser Al Masri <ys...@yahoo.com> on 2011/10/01 12:18:49 UTC

[scxml] Syntax Question

what's the best way to check whether a given variable is any of values within a list? For example, I want to say this:

cond="myvar In('a','b','c')"

or

cond="mylist.contain(myvar)"

Re: [scxml] Syntax Question

Posted by Rahul Akolkar <ra...@gmail.com>.
On Sat, Oct 1, 2011 at 6:18 AM, Yasser Al Masri <ys...@yahoo.com> wrote:
> what's the best way to check whether a given variable is any of values within a list? For example, I want to say this:
>
> cond="myvar In('a','b','c')"
>
> or
>
> cond="mylist.contain(myvar)"
>
<snip/>

Syntax of expressions within the SCXML document depends on the
expression language (EL) in use. Please see the documentation for the
EL you're using.

For example, if you're using JEXL, see (though thats 2.0 syntax, out
of the box you'd be on 1.1):

  http://commons.apache.org/jexl/reference/syntax.html

You can also write your own EL functions if the syntax doesn't easily
afford what you want to do. For more on method invocation from ELs,
see bottom of this page which illustrates that using two of the common
ELs:

  http://commons.apache.org/scxml/guide/contexts-evaluators.html

-Rahul

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