Cisco Cisco Customer Voice Portal Downloads Guía Del Desarrollador
C
HAPTER
9:
C
ONFIGURABLE
E
LEMENTS
C
ISCO
CVP V
OICE
XML 3.1
Programmer
Guide
task. The error message will be logged in the application’s error log and the error element (if
applicable) will be visited. This method additionally throws a
applicable) will be visited. This method additionally throws a
VException
, which is thrown by
incorrectly configured VFCs and does not need to be thrown explicitly by the element execution
method itself.
method itself.
Utility Methods
String getSubmitURL()
One of the restrictions listed for creating a voice element is to use an CVP VoiceXML-specified
URL when submitting back to CVP VoiceXML Server. This method returns the URL to use. The
developer would use this URL in a
URL when submitting back to CVP VoiceXML Server. This method returns the URL to use. The
developer would use this URL in a
<submit>
adding any arguments desired.
VAction getSubmitVAction(String args, VPreference pref)
This is a convenience method which provides more than
getSubmitURL()
does by returning a
new
VAction
object containing the entire submit to the Server along with any arguments passed
as input (as a space-delimited list). The
VPreference
object is required to instantiate the
VAction
object and can be obtained by calling the
getPreference()
method of the
VoiceElementData
object. The
VAction
object returned by the
getSubmitVAction()
method is
just like any other, the developer can add additional actions to it as desired.
VAction getSubmitVAction(VAction existing, String args)
This convenience method does the same as the above method except it adds the submit to an
existing
existing
VAction
object passed as input. There is no
VPreference
object required because no
new VFC objects are instantiated in this method. This method may be more convenient if the
developer wants to perform some actions (such as the declaration or assigning variables) before
the submit occurs.
See Appendix A: The Voice Foundation Classes for a full description of the VFCs.
developer wants to perform some actions (such as the declaration or assigning variables) before
the submit occurs.
See Appendix A: The Voice Foundation Classes for a full description of the VFCs.
VoiceElementResult createSubVoiceElement(VoiceElementBase mainVoiceElement,
VMain vxml, Hashtable params, VoiceElementData data)
There are times when one wishes to create a voice element that acts a combination of a group of
existing voice elements, something like a “super-element”. While one can simply build this
element from scratch, it would be desirable to somehow leverage the work already done with
existing voice elements. The advantage would be that the super-element code need not contain
any VFC code, it would only act as the container for sub-elements within it. This is possible
utilizing the
existing voice elements, something like a “super-element”. While one can simply build this
element from scratch, it would be desirable to somehow leverage the work already done with
existing voice elements. The advantage would be that the super-element code need not contain
any VFC code, it would only act as the container for sub-elements within it. This is possible
utilizing the
createSubVoiceElement()
method.
This method is intended to be called from an instance of a sub-element, not the super-element.
The super-element first creates an instance of the sub-element and then calls this method from
that instance. This executes a sub-element within the super-element using the same context. The
sub-element executes normally, it reads from a configuration object and creates VFC classes.
The super-element first creates an instance of the sub-element and then calls this method from
that instance. This executes a sub-element within the super-element using the same context. The
sub-element executes normally, it reads from a configuration object and creates VFC classes.
Copyright 2001 - 2005 Audium Corporation. All Rights Reserved. 10/05
59