commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ate Douma (JIRA)" <>
Subject [jira] [Commented] (SCXML-186) Groovy expression evaluator
Date Tue, 28 Jan 2014 20:38:42 GMT


Ate Douma commented on SCXML-186:

If/when using the pre-processing as by *default* configured in GroovyEvaluator, you accept
these aliases to become like 'keywords' and thus an expression like "if (and == 'test' )"
should not be regarded as a valid expression.

If this is not acceptable, meaning for some reason one or more of these aliases must not be
'reserved' but usable as regular variable names, then you can change the default preprocessor
if you want by overriding the GroovyEvaluator#getScriptPreprocessor() method. And it should
be trivial to then provide aliases like @and, @or, etc.
(note: I just committed a fix to make this work properly)

However, I would think these default aliases to be very unlikely to be commonly used as 'normal'
variables in practice.
Even though they are not really Groovy keywords, I think most developers naturally should
and will refrain from using these as ordinary variable names.

Hence, I think the current configured default aliases are more more natural and convenient
to use.   

> Groovy expression evaluator
> ---------------------------
>                 Key: SCXML-186
>                 URL:
>             Project: Commons SCXML
>          Issue Type: New Feature
>            Reporter: Woonsan Ko
>            Assignee: Ate Douma
>             Fix For: 2.0
> A Groovy expression evaluator for SCXML expression can offer richer functionality which
cannot be supported by the other simpler expression evaluator.

This message was sent by Atlassian JIRA

View raw message