commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Sparr - www.goomzee.com" <m...@goomzee.com>
Subject Re: [SCXML] conditional logic; dynamically assign event
Date Thu, 06 Apr 2006 00:37:26 GMT
Never mind... I think the correct usage is to create multiple events of same
name with cond="${empty varName}">

....

Thanks!  Need more pepsi - I should've remembered that!




On 4/5/06 6:22 PM, "Mike Sparr - www.goomzee.com" <mike@goomzee.com> wrote:

> 
> Can I dynamically assign and event name?
> 
> What is the suggested way to implement and incremental prompt, assign,
> transact?  For instance, let's say I send one prompt at a time but need from
> account, to account and amount before firing a transferFunds event:
> 
> I have another menu option transition even that fires off the request for
> FromAccount.  I would like to keep sending the same event until we
> incrementally fill the required fields for the transferFunds event.
> 
> ===
> 
> <var name="fromAccount" />
> <var name="toAccount" />
> <var name="amount" />
>        
>      <transition event="transfer">
>             <var name="cb" expr="${Conversation}" />
>             <var name="promptField" expr="'From Account?'" />
>             <var name="thisEvent" expr="'transfer'" />
>             <if cond="${empty fromAccount}">
>                     <assign name="fromAccount" expr="${cb.request}" />
>                     <assign name="promptField" expr="'To Account?'" />
>                     <assign name="thisEvent" expr="'transfer'" />
>                 <elseif cond="${empty toAccount}"/>
>                     <assign name="fromAccount" expr="${cb.request}" />
>                     <assign name="promptField" expr="'Amount?'" />
>                     <assign name="thisEvent" expr="'transferFunds'" />
>             </if>
>             <send target="http://localhost:8080/app" targettype="client"
> event="${thisEvent}" namelist="cb fromAccount toAccount amount">
> <vxml version="2.0">
> <form>
> <field name="input">
> <prompt>
> ${promptField}
> </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="state_login" />
>      </transition>
> 
> 
> 
> THANKS A BUNCH FOR ANY STEER ON HOW BEST TO HANDLE THIS SITUATION!!!
> 
> 
> Mike
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org



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


Mime
View raw message