commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Sparr -" <>
Subject Re: [SCXML] variable scoping
Date Fri, 07 Apr 2006 04:21:18 GMT
Hi Rahul,

I have consolidated questions that have been looming below, plus response to
your input on variable scoping.

Tomorrow I will upgrade our snapshot with your changes.  This message got
filtered as junk mail so I didn't see it until now.  Thanks for the input.
Yes, based upon spec I should've been able to lazily instantiate the vars
w/o expr="" but will test that out with this snapshot.  I did try the
<onentry><var...> and got exceptions but that could've been because I didn't
declare them as blank.  I think I used expr="''" and other variations to get
it to work.

The datamodel seems like best option so I'm looking forward to updating our
snapshot.  Offhand, do you know the svn command/url to check out your
latest?  First I'll test against your nightly binary tomorrow, but I have an
ANT build script for packaging everything so I want to pull down source.

In addition, I recall a while back that we modified your source to exclude
the xmlns handling in the digester - what was your final solution to that?
Did you turn it off, leave it on or make it configurable via the factory

EL QUESTION (substring):
The voice browser being used (Nuance) had built-in grammars and leveraging
the currency grammar returns "USD20" for 20 dollars.  In the EL I've tried
various attempts to parseInt or substring or replace to no avail.  How would
I remove the currency code prefix using the EL in the framework?  Do you
have a document on available functions - I've tried JSP 2.0 functions and
they didn't exist and documentation on Commons EL usage resorts to JavaDoc
but little/no function reference.  Suggest Commons EL team copy and
list all available functions with description/examples...

SUGGESTION/QUESTION (toggle hot deploy/performance):
I think it would be beneficial to add in configurable hot-deploy/performance
modes.  Hot-deploy would reload the engine document upon change and
performance would not.  This likely would not be part of the commons
contrib. but do you know how I could implement that.  The flexibility of
scripting new cases in the XML is enticing but continual server reboots to
clear memory hassle, especially for development.  Suggestions?

SUGGESTION/QUESTION (performance/memory for executor store):
If app runs a long time, executor store may become rather large.  Suggested
implementation?  Currently Hashmap w/o worker for cleanup, ttl, timestamp.
Curious if best with timestap, ttl and perhaps LRU LinkedList


On 4/5/06 11:41 PM, "Rahul Akolkar" <> wrote:

> On 4/5/06, Mike Sparr - <> wrote:
>> Can someone help with variables?  I want to declare some global variables
>> for the xml engine, then have various conditional events set the values of
>> those variables.  I would like to have access to those variables from one
>> transition event to the next.   I get the following errors:
>> 09:04:02,372 WARN  [SimpleErrorReporter] UNDEFINED_VARIABLE (fromAccount =
>> null):
>> 09:04:02,372 WARN  [SimpleErrorReporter] UNDEFINED_VARIABLE (fromAccount =
>> null):
>> 09:04:02,372 WARN  [SimpleErrorReporter] UNDEFINED_VARIABLE (toAccount =
>> null):
> <snip/>
> Two things to do:
> (1) Make sure the <var> elements are inside the <onentry> (or
> transition or onexit) -- which is where executable content is
> permissible. Which reminds me, I think a schema is now available, so
> its about time we start validating the documents in order to flag such
> things at parsing.
> (2) Add an empty expr attribute (expr="") to the <var> elements, or
> wait for the next nightly (20060406) where this oddity will be fixed.
> If that doesn't do it, please post a more complete snippet of the
> document, so we can look at this further.
> -Rahul
>> =======
>> Tried:
>> <scxml>
>> <state id="logged_in">
>> ...
>> <var name="fromAccount" />
>> <var name="toAccount" />
>>     <transition event="banking.transfer" cond="${empty fromAccount and
>> empty toAccount}">
>>            <var name="cb" expr="${Conversation}" />
>>            <assign name="fromAccount" expr="${cb.request}" />
>>            <send target="http://localhost:8080/app" targettype="client"
>> event="banking.transfer" namelist="cb fromAccount toAccount" delay="0"
>> hints="" sendid="0009"><vxml version="2.0">
>> <form>
>> <field name="input">
>> <prompt>
>> To Account?
>> </prompt>
>> <grammar src="builtin:grammar/digits?length=7"></grammar>
>> <noinput><reprompt/></noinput><nomatch><reprompt/></nomatch>
>> </field>
>> <filled namelist="input">
>> <submit next="http://localhost:8080/app/Voice" namelist="input"/>
>> </filled>
>> </form>
>> </vxml>
>>            </send>
>>         <target next="logged_in" />
>>     </transition>
>> ======
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message