CCXML Voxeo 1.0 Development Guide Home  |  Frameset Home

This documentation is for CCXML 1.0-Voxeo, which has been superceded by CCXML 1.0-W3C. The CCXML-Voxeo platform is not being updated any longer. The CCXML 1.0-W3C version, however, has many new features and is actively being enhanced. If you're writing a new CCXML application, you should use CCXML 1.0-W3C. Click here for the CCXML 1.0-W3C documentation.

<transition>  element


The <transition> element is used to catch incoming asynchronous events. The first <transition> element encountered in the document order that matches up with a specific event will be the first one executed by the CCXML interpreter.

Once a <transition> has been encountered, the tags nested within the element will then be executed in document order. If an event is thrown, and no matching <transition> is exeistent in the document, then the event will be dropped entirely, (and there will consequently be a message in the Voxeo logger indicating that an unhandled event was encountered).

Should any subsequent events arrive while a <transition> is already in progress, this second event will be placed into the event queue for later processing.


usage

<transition cond="(ECMAScript Expression)" event="(ECMAScript Expression)" name="(variable name)" state="STRING">


attributes

cond Data Type: (ECMAScript Expression) Default: True
The cond attribute specifies an ECMAScript expression which can be evaluated to 'true' or 'false'. A condition must evaluate to 'true' in order for any enclosed operations to be performed.
event Data Type: (ECMAScript Expression) Default: none - attribute is required
The event attribute denotes the matching event type used to kick off the code contained within the <transition> element. Event types can be a user-defined, dot separated ECMAScript string of any length, or, (more commonly), it can indicate a platform-defined event type. Note that the '*' suffix is a wildcard, and will match zero or more characters of any event name.

name Data Type: (variable name) Default: none - attribute is required
The name attribute denotes the unique variable that is to receive the event indicated in the <transition> element.
state Data Type: STRING Default: none - attribute is required
Indicates the current possible state(s) of the eventhandler.



parents

<eventhandler>


children

<accept>   <assign>   <createccxml>   <createconference>   <destroyconference>   <dialogstart>   <dialogterminate>   <disconnect>   <else>   <elseif>   <if>   <join>   <reject>   <send>   <unjoin>   <var>


code samples

<Transition state-event> sample
<?xml version="1.0" encoding="UTF-8"?>
<ccxml version="1.0">
  <eventhandler>

    <transition event="connection.CONNECTION_ALERTING" name="evt">
        <accept callid="'MyCallID'"/>
  </transition>



    <transition event="connection.CONNECTION_CONNECTED">
      <log expr="'Call was answered.'"/>
      <disconnect/>
    </transition>

    <transition event="call.CALL_INVALID">
      <exit/>
    </transition>

  </eventhandler>
</ccxml>



additional links

W3C Specification


  ANNOTATIONS: EXISTING POSTS
mho
5/28/2004 10:32 PM (EDT)
Sorry -- this does not seem to work - please ignore it.

<transition state="'state_1'||'state2'||'state3'" event="dialog.exit" name="evt" >
Michael.Book
6/2/2004 4:40 PM (EDT)
Hi Mho / All,

If you want to specify multiple values for the 'state' attribute, it should look more like this:
__________________________

<transition state="('state_1') || ('state2') || ('state3')" event="dialog.exit" name="evt">
__________________________

I hope this helps...

Have Fun,

~ Michael

login



© 2011 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site