commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Sparr -" <>
Subject [SCXML] EL and dynamic transition target
Date Tue, 13 Dec 2005 23:58:26 GMT
Hi Rahul,

One more query from my guy about our next step, getting EL to work:

============ HIS QUESTION

I tried various patterns to achieve to change the state based on guard
condition, but the <transition><target> does not work.  I manage to get
the log "'IF Input was one'" etc on the selection, but the state remains
in 'state_welcome'

I am using the URL http://localhost:8080/goomzee/Voice for testing this.

First box is for event, and second is for input. The 'event' need not be
entered, based on the scxml, it is set to 'greet' 

  <transition event="greet" >
    <var name="cb" expr="${ConversationBeanID}" />
    <var name="ip" expr="${cb.userInput}" />
    <var name="nextState" expr="state_welcome" />      

    <log expr="'Input from cb was:' ${ip}" />
    <log expr="'Event from cb was:' ${cb.event}" />
    <if cond="${ip == 1}">
      <log expr="'IF Input was one'" />
      <assign name="nextState" expr="state_login" />
    <elseif cond="${ip == 2}" />
      <log expr="'IF Input was two'" />
      <assign name="nextState" expr="state_logoff" />
    <else />
      <log expr="'IF Other Input was :' ${ip} " />
    <log expr="'Next State var :' ${nextState}" />          
    <target next="${nextState}" />

=========== /HIS QUESTION


perhaps within the conditional block, we add another transition:

<if cond="${ip == 1}">
    <target next="state_logoff" />
<else />

instead of assigning the variable and trying to execute at the end after
evaluation?  Do you know if our attempt above should work, or is the
only way to implement by explicitly declaring the transition within the
<if>...<else>...</if> blocks?



-----Original Message-----
From: Rahul Akolkar [] 
Sent: Tuesday, December 13, 2005 12:44 PM
To: Jakarta Commons Users List;
Subject: Re: [SCXML] Concurrent users

On 12/13/05, Mike Sparr - <> wrote:
> Rahul,
> I think build may have broke due to dependency on XercesImpl, 
> xml-apis, and possibly xalan jar dependencies.  Your recent code 
> change likely requires them now so you may update the dependencies and

> jars to your build.xml, plus the docs.

Yes, I revisited this yesterday. At this point, I'm not happy declaring
those dependencies, so I left a comment in the code and removed the
recently added utility method Send#getBodyContent(). The details of the
related change are here:

It seems the Commons nightlies didn't build today (none of the projects
were built) so today's failure seems unrelated.

>  Also, we noticed that the context vars return
> null within onentry and can only be retrieved during ontransition.  
> I'm not sure if just our implementation or how it's built.  Anyhow, 
> just a little input from our findings.

Umm, that doesn't sound right. If you can produce the smallest possible
test document that demonstrates this, I'll be happy to take a look.


> Rgds,
> Mike

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message