Cisco Cisco Unified Customer Voice Portal 11.0(1) Developer's Guide

Page of 79
C
HAPTER 
9:
 
C
ONFIGURABLE
 E
LEMENTS
 
 
C
ISCO 
CVP V
OICE
XML 3.1
 
 
  
Programmer 
Guide 
 
substitution or prevent it, for example if that setting’s behavior would be too unpredictable if 
its value were set dynamically. See the User Guide for more on substitution. 
• 
The setting default value. When an element is dragged to the workspace for the first time, the 
element can specify default values for all settings. This allows the application designer to 
create applications very rapidly by choosing the default values and tweaking them later 
during the testing phase. A setting need not have a default value, especially if one cannot be 
predicted (such as a call transfer phone number). 
• 
Setting dependencies. A setting can specify criteria that determines whether it appears in 
Studio’s Element Configuration Pane. The criteria involves setting the relationship between 
the setting and the other setting(s) that it depends on. One can even build complex logic 
expressions for determining when the setting appears. The main purpose for setting 
dependencies is to simplify the process of configuring the element in Studio. By displaying 
only the settings appropriate for the configuration the designer desires, settings that are not 
applicable can be safely hidden to avoid confusion and possible conflicting information. For 
example, a setting for specifying the confidence value of a data capture field would not be 
required if the input mode of the element were set to DTMF. So one can set the confidence 
setting to appear only when the input mode setting is not DTMF. Many CVP VoiceXML 
Elements employ dependencies to simplify their configuration and so are good examples of 
how dependencies are implemented. 
A setting’s dependencies are defined by using the 
Dependency
 Java class. A single 
dependency instance defines any number of setting values combined with the “and” logical 
operator. For example, single 
Dependency
 object can define that a setting appears only if one 
setting is set to “true” and another is set to “10”. 
A setting can take an array of 
Dependency
 objects. Each 
Dependency
 object in the array is 
considered combined with the “or” logical operator. So to make a setting appear when one 
setting is “true” or another setting is “10”, two 
Dependency
 objects are created and placed in 
a 2-member array. 
Configuring dependencies for settings can be complex and involved, though once set up, they 
can greatly simplify the configuration of a complex element. Cisco CVP VoiceXML 
provides several examples of custom elements on Audium Support Center, including 
elements with complex setting dependencies. Additionally, the Javadocs for the various 
classes describe what each class and its member methods are used for. 
Configuration Classes 
As described in the above section, each configurable element’s execution method receives a 
Session API class that is used to obtain the element’s configuration. Do not confuse this with the 
methods in 
ElementBase
 that are used to describe the configuration to CVP VoiceXML Studio. 
We are referring here to a Java object that contains a full configuration the application designer 
entered in Studio or that came from a dynamic element configuration Java class or via the XML 
API. 
 
 
Copyright 2001 - 2005 Audium Corporation.  All Rights Reserved. 10/05
 
52