CallXML 3.0 Development GuideHome  |  Frameset Home


<exit>  element

The <exit> element allows the developer to exit the session in question when it is executed in the callXML application. In short, it is much like an 'emergency brake' for a CallXML application. Note that in the event that an <exit> element is hit prior to a particular event handler executing, the <exit> will take precedence.


usage
<exit id="(element id)" test="CDATA" value-is="STRING" value-is-not="STRING">


attributes
idData Type: (element id)Default: none - attribute is optional
The new 'id' attribute in CallXML3.0 is applicable to all container and action elements. Specifying this attribute allows yet another level of control and event handling when events occur and are caught by the <on> element. When an event occurs, the handler will first check the event, and then verify that the handler has a handler specific to the 'id' attribute to execute. This allows the developer to plan a specific course of action for events based on where in the application that they occur.
testData Type: CDATADefault: Optional
The 'test' attribute is a new supplement to the CallXML markup that permits the developer to execute the contents of a container element, or action element, based on whether or not the specified condition is met. If the defined condition is met, then the code contained within the element is then executed. If the condition is not met, then the application resumes execution with the next sequential container container element in the document.
value-isData Type: STRINGDefault: none - attribute is optional
Another new attribute, 'value-is', grants the developer with the ability to perform conditional logic upon container elements, or action elements for the first time within the CallXML markup. The value specified in the 'value-is' attribute specifies a string to compare against any 'value' attributes. If the 'value' and 'value-is' equate to 'true', then the element specified will execute. If the value equates to 'false' then the element will be skipped during document execution.
value-is-notData Type: STRINGDefault: none - attribute is optional
Another new attribute, 'value-is-not', grants the developer with the ability to perform conditional logic upon container elements, or action elements, for the first time within the CallXML markup. The value specified in the 'value-is-not' attribute specifies a string to compare against any 'value' attributes. If the 'value' and 'value-is-not' equate to 'false', then the element specified will execute. If the value equates to 'true' then the element will be skipped during document execution.



code samples
<3.0 exit sample>
<?xml version="1.0" encoding="UTF-8"?>

<callxml version="3.0">
  <do label="B_1">
    <prompt>
    Are we ready to exit? Lets get out of this dive!
    </prompt>

    <exit/>

    <prompt>
    Thats right, this prompt will never,
    ever be read out to our callers.   
    </prompt>

  </do>

</callxml>


<3.0 exit-valueis>
<?xml version="1.0" encoding="UTF-8"?>

<callxml version="3.0">

  <do label="B_1" value="rickles">
    <prompt>
    Are we ready to exit? Lets get out of this dive!
    </prompt>

    <exit value-is="knotts"/>

    <prompt>
    Hey, we didnt exit.
    Thats because the block value is not equal to knotts.   
    </prompt>

    <exit value-is="rickles"/>

    <prompt>
    Thats right, this text will never,
    ever be read out to our callers.   
    </prompt>

  </do>


</callxml>


<3.0 exit-test>
<?xml version="1.0" encoding="UTF-8"?>

<callxml version="3.0">

  <do label="B_1">
    <prompt>
    Are we ready to exit? Lets get out of this dive!
    </prompt>

    <exit test="'otis'='cletus'"/>

    <prompt>
    Hey, we didnt exit.
    Thats because otis is not equal to cletus.   
    </prompt>

    <exit test="'otis'='otis'"/>

    <prompt>
    Thats right, this text will never,
    ever be read out to our callers.   
    </prompt>

  </do>


</callxml>




additional links
none


  ANNOTATIONS: EXISTING POSTS
0 posts - click the button below to add a note to this page

login



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