Cisco Cisco Unified Customer Voice Portal 10.5(1) 開発者ガイド

ページ / 98
C
HAPTER 
9:
 
C
ONFIGURABLE
 E
LEMENTS
 
 
V
OICE
XML
 
P
ROGRAMMING 
G
UIDE 
 
 
 
FOR 
C
ISCO 
U
NIFIED 
C
USTOMER 
V
OICE 
P
ORTAL 
R
ELEASE 
4.0(1) 
 
 
 
 
44
 
configured to allow substitution or prevent it, for example if that setting’s behavior would be 
too unpredictable if its value were set dynamically. See the VoiceXML Server User Guide 
for Cisco Unified Customer Voice Portal 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 determine whether it appears in 
VoiceXML Studio’s Element Configuration Pane. The criteria involve 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 VoiceXML 
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 Unified CVP 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. 
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 Unified CVP VoiceXML 
Studio. We are referring here to a Java object that contains a full configuration the application 
designer entered in VoiceXML Studio or that came from a dynamic element configuration Java 
class or via the XML API. 
These Java classes, 
ActionElementConfig
DecisionElementConfig
, and 
VoiceElementConfig
 are found in the 
com.audium.server.xml
 package and all extend the 
base class 
ElementConfig
. These classes are identical to those used when constructing dynamic 
element configuration classes. Refer to Chapter 6: Dynamic Element Configurations for a good 
description of these configuration classes. While dynamic configurations are responsible for