[SCXML] Support for Commons JEXL in SCXML

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[SCXML] Support for Commons JEXL in SCXML

Diptendu Dutta
Some thing like

<datamodel>
                <data id="intent" expr="null"/>
                <data id="startState" expr="&quot;Start&quot;"/>
</datamodel>
..
     <state id="StartBot">
..
      <transition target='${startState}' />
     </state>

does not work.

*SEVERE: Transition target with ID "${startState}" not found*

However, the spec at
https://commons.apache.org/proper/commons-jexl/reference/syntax.html
mentions

If a variable user valued JEXL is present in the environment - whether as a
local or global variable -, the format

`Hello ${user}`

will evaluate as

Hello JEXL

How can I make this work?

Regards,

Diptendu Dutta
Reply | Threaded
Open this post in threaded view
|

Re: [SCXML] Support for Commons JEXL in SCXML

Woonsan Ko-3
Hi Diptendu,

I don't think the 'target' attribute is meant to be used with
expressional values. [1]
I guess you might want to try with transition elements with cond
attribute, which is expressional [1], instead.
For example,

    <transition target="Start" cond="user != null" />
    <transition target="SomethingElse" cond="user == null" />

Regards,

Woonsan

[1] https://www.w3.org/TR/scxml/#transition

On Mon, Jul 15, 2019 at 10:51 AM Diptendu Dutta
<[hidden email]> wrote:

>
> Some thing like
>
> <datamodel>
>                 <data id="intent" expr="null"/>
>                 <data id="startState" expr="&quot;Start&quot;"/>
> </datamodel>
> ..
>      <state id="StartBot">
> ..
>       <transition target='${startState}' />
>      </state>
>
> does not work.
>
> *SEVERE: Transition target with ID "${startState}" not found*
>
> However, the spec at
> https://commons.apache.org/proper/commons-jexl/reference/syntax.html
> mentions
>
> If a variable user valued JEXL is present in the environment - whether as a
> local or global variable -, the format
>
> `Hello ${user}`
>
> will evaluate as
>
> Hello JEXL
>
> How can I make this work?
>
> Regards,
>
> Diptendu Dutta

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]