Voxeo Documentation - <createccxml> Element

The <createccxml> element is used to spawn another thread of control, which begins execution with the document identified by this element. This thread of control provides independent execution and a separate variable space for the CCXML documents that it executes. Independent threads spawned with the <createccxml> element are associated with one or more event endpoints, and these endpoints are the only elements capable of sending events to the independent threads.

Syntax

The following code example shows the syntax for the <createccxml> element.

<createccxml enctype="myEnctypeExpression" fetchparam="myFetchParamExpression" maxage="myMaxAgeExpression" maxstale="myMaxStaleExpression" method="GET" namelist="myNameListString" next="myNextExpression" parameters="myParametersString" sessionid="mySessionIdExpression" timeout="myTimeoutExpression" />

Attribute Details

The following table describes the attributes for the <createccxml> element.

enctype

Required: false

Type: ECMAScript Expression

Default: application/x-www-form-urlencoded

Specifies the media encoding type of the submitted document, when the POST method is used. The only allowable value of this attribute is application/x-www-form-urlencoded, which indicates that the variables in the namelist attribute must be URL-encoded.

Valid Values: An ECMAScript Expression that returns a valid media encoding type.

Constraints: Valid only when the method attribute has the value POST, otherwise ignored.

fetchparam

Required: false

Type: ECMAScript Expression

Default: 'none'

Specifies additional parameters not already passed in the namelist attribute to a web server to fetch a CCXML document. The allowable values for this attribute are:

 

none - Indicates that no additional parameters are required.

 
 

session-id - Include the session.id property of the newly created session when fetching the CCXML document.

 
 

session - Include the session.id property as well as session.values properties when fetching the CCXML document. The evaluation of the session.values properties occurs after it was populated according to the parameter attribute. This allows you to pass data to the web server and the new CCXML session.

 

maxage

Required: false

Type: ECMAScript Expression

Default: none

Specifies the maximum acceptable age, in seconds, of the resource in question.

We do not recommend that you rely on this attribute for cache control; caching is always best controlled by the response headers of the hosting server. If no headers are specified, then no cache control is present, regardless of the value set for the maxage attribute.

Valid Values: An ECMAScript Expression that returns a valid time value for the request.

maxstale

Required: false

Type: ECMAScript Expression

Default: none

Specifies the maximum acceptable staleness, in seconds, of the resource in question.

We do not recommend that you rely on this attribute for cache control; caching is always best controlled by the response headers of the hosting server. If no headers are specified, then no cache control is present, regardless of the value set for the maxstale attribute.

Valid Values: An ECMAScript Expression that returns a valid time value for the request.

method

Required: false

Type: ECMAScript Expression

Default: GET

Specifies the HTTP method to use. The allowable values for this attribute are:

 

GET - The GET method is used to fetch the URI

 
 

POST - The POST method is used to submit the URI

 

If unspecified, then the GET value is assumed, unless the submission of multi-part or form data is encountered, in which case the POST value is assumed.

namelist

Required: false

Type: Variable List

Default: none

Specifies a space-separated list of zero or more CCXML variable names to be submitted to the web server. The variables are available as a variable and value pair in the resultant URI query string that is sent to the web server. Before a variable is sent to the web server, the value is converted into a string.

Valid Values: A list of ECMAScript Variable names.

next

Required: true

Type: ECMAScript Expression

Default: none

Specifies the URI of the resource to be fetched.

Valid Values: An ECMAScript Expression that returns a valid URI.

parameters

Required: false

Type: Variable List

Default: none

Specifies a space-separated list of one or more CCXML variable names to be sent to the dialog environment as a listing of variable and value pairs. The values are formed by converting the referenced ECMAScript variable to string form.

Valid Values: A list of ECMAScript Variable names.

sessionid

Required: false

Type: ECMAScript Left Hand Side Expression

Default: none

Specifies a previously-defined variable that receives a platform-defined unique identifier that denotes the newly-instantiated thread of control.

Valid Values: An ECMAScript Variable.

timeout

Required: false

Type: ECMAScript Expression

Default: none

Specifies the maximum time to allow the fetch attempt for the resource specified by the next attribute to be made. If the CCXML session is unable to fetch the resource within the timeout interval denoted, then an error.fetch event is thrown.

Valid Values: An ECMAScript Expression that returns a character string in CSS2 format.

Parents

None.

Children

None.

Code Samples

The following code sample shows use of the <createccxml> element.

createCCXML.xml

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

<ccxml version="1.0" xmlns="http://www.w3.org/2002/09/ccxml">

 

<eventprocessor>

<transition event="ccxml.loaded">

<log expr="'***** CCXML.LOADED *****'" />

<createccxml next="'CCXML_child.xml'" />

</transition>

 

<transition event="error.createccxml">

<log expr="'***** ERROR.CREATECCXML *****'" />

</transition>

 

<transition event="ccxml.created">

<log expr="'***** CHILD SESSION STARTED: ' + event$.sessionid" />

<log expr="'***** CCXML.CREATED *****'" />

<exit/>

</transition>

 

<transition event="ccxml.exit">

<log expr="'***** CHILD SESSION HAS EXITED *****'" />

<exit/>

</transition>

</eventprocessor>

</ccxml>

CCXML_child.xml

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

<ccxml version="1.0" xmlns="http://www.w3.org/2002/09/ccxml">

 

<eventprocessor>

<transition event="ccxml.loaded">

<log expr="'*** CCXML.LOADED:CHILD SESSION ***'" />

</transition>

 

<transition event="ccxml.kill">

<log expr="'*** CCXML.KILL:CHILD SESSION ***'" />

</transition>

 

<transition event="connection.failed">

<log expr="'*** CONNECTION.FAILED:CHILD SESSION ***'" />

<exit/>

</transition>

 

<transition event="connection.disconnected">

<log expr="'*** CONNECTION.DISCONNECTED:CHILD SESSION ***'" />

<exit/>

</transition>

 

<transition event="connection.connected">

<log expr="'*** CONNECTION.CONNECTED:CHILD SESSION ***'" />

</transition>

 

<transition event="connection.alerting">

<accept/>

<log expr="'*** CONNECTION.ALERTING:CHILD SESSION ***'" />

</transition>

</eventprocessor>

</ccxml>

Downloadable Sample Code

See Also

CCXML 1.0-W3C Development Guide

Element Summary

Voxeo Support

 

The <createccxml> element is used to spawn another thread of control, which begins execution with the document identified by this element. For more information, see <createccxml> Element.

 

(Call Control eXtensible Markup Language)

 

The <createccxml> element is used to spawn another thread of control, which begins execution with the document identified by this element. For more information, see <createccxml> Element.

 

An event corresponds to a specific situation that may occur within an application, for example, in a voice application, a caller has not providing any input, a NoInput event, or the back-end is not available, an Error Connector event. Event handling can be utilized to handle these situations.

 

The <createccxml> element is used to spawn another thread of control, which begins execution with the document identified by this element. For more information, see <createccxml> Element.

 

The <createccxml> element is used to spawn another thread of control, which begins execution with the document identified by this element. For more information, see <createccxml> Element.

 

Session is a generic term for an active voice application dialog or call. Typically, a session corresponds to a call but can also include tasks.

 

The <createccxml> element is used to spawn another thread of control, which begins execution with the document identified by this element. For more information, see <createccxml> Element.

Voxeo Documentation

     Voxeo Documentation Overview
  Evolution Developer Portal Documentation
  Voxeo CXP Documentation
  Prophecy Documentation
  XML Development Languages Documentation
  VoiceXML 2.1 Development Guide
     VoiceXML Development Guide v2.1 Overview
     Platform Overview
     Creating an Application
     Voxeo File Manager
     Caching Tips and Techniques
     Cache Manager API
     Security Information
  Learning VoiceXML 2.1
  Best Practices
  Debugging Techniques
  Exceptions and Errors
  VoiceXML 2.1 Porting Guide
  VoiceXML Variables
  All Things Audio
  Outbound Dialing
  Property Guide
  GSL Grammars
  grXML Grammars
     Custom Features
     External References
  Text-To-Speech Guide
     VoIP Dialing
     Voxeo Designer User Interface
  Element Reference Guide
     Element Summary
     <assign> Element
     <audio> Element
     <block> Element
     <break> Element
     <catch> Element
     <choice> Element
     <clear> Element
     <data> Element
     <disconnect> Element
     <else> Element
     <elseif> Element
     <emphasis> Element
     <enumerate> Element
     <error> Element
     <example> Element
     <exit> Element
     <field> Element
     <filled> Element
     <foreach> Element
     <form> Element
     <goto> Element
     <grammar> Element
     <help> Element
     <if> Element
     <initial> Element
     <item> Element
     <link> Element
     <log> Element
     <mark> Element
     <media> Element
     <menu> Element
     <meta> Element
     <noinput> Element
     <nomatch> Element
     <one-of> Element
     <option> Element
     <paragraph> Element
     <param> Element
     <phoneme> Element
     <prompt> Element
     <property> Element
     <prosody> Element
     <record> Element
     <reprompt> Element
     <return> Element
     <rule> Element
     <ruleref> Element
     <say-as> Element
     <script> Element
     <sentence> Element
     <sub> Element
     <subdialog> Element
     <submit> Element
     <tag> Element
     <throw> Element
     <token> Element
     <transfer> Element
     <value> Element
     <var> Element
     <voxeo:logcontrol> Element
     <voxeo:recordcall> Element
     <vxml> Element
  CCXML 1.0 Development Guide
     CCXML 1.0-W3C Development Guide
     Platform Overview
     Creating an Application
     Voxeo File Manager
     Caching Tips and Techniques
     Cache Manager API
     Prophecy Porting Guide for CCXML
  Learning CCXML 1.0
  All Things Audio
  Debugging Techniques
  Event and Error Handling
  Dialog Extensions
     Client Side Scripting
  Outbound Dialing
     HTTP Requests Using the <send> Element
  Passing in Application Parameters
     CCXML 1.0 Objects
     Session and Application Variables
     Voxeo-Specific Properties
  Element Reference Guide
     Element Summary
     <accept> Element
     <assign> Element
     <cancel> Element
     <ccxml> Element
     <createcall> Element
     <createccxml> Element
     <createconference> Element
     <destroyconference> Element
     <dialogprepare> Element
     <dialogstart> Element
     <dialogterminate> Element
     <disconnect> Element
     <else> Element
     <elseif> Element
     <eventprocessor> Element
     <exit> Element
     <fetch> Element
     <foreach> Element
     <goto> Element
     <if> Element
     <join> Element
     <log> Element
     <merge> Element
     <meta> Element
     <metadata> Element
     <move> Element
     <redirect> Element
     <reject> Element
     <script> Element
     <send> Element
     <transition> Element
     <unjoin> Element
     <var> Element
     <voxeo:sendemail> Element
  CallXML 3.0 Development Guide
  Voxeo Support
     Support Quick Reference
  Registering for an Account
  Self-Help Tools
  Collecting Information
  Evolution Ticketing System
     Submitting a Support Request
     Escalating a Support Request
  Software Lifecycle and Support Policies
  Getting Further Assistance
  Voxeo Glossary
  Help on Help