Cisco Cisco Customer Voice Portal Downloads Note De Mise
C
HAPTER
9:
C
ONFIGURABLE
E
LEMENTS
P
ROGRAMMING
G
UIDE FOR
C
ISCO
U
NIFIED
CVP
VXML
S
ERVER
AND
C
ISCO
U
NIFIED
C
ALL
S
TUDIO
R
ELEASE
7.0(1)
58
when the method returns a proper exit state will VXML Server follow the application call flow
and proceed to the next element. The method throws an
and proceed to the next element. The method throws an
ElementException
that is used to
indicate an error occurred within the execution method that prevented the voice element from
doing its assigned 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
doing its assigned 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
VException
,
which is thrown by incorrectly configured VFCs and does not need to be thrown explicitly by the
element execution method itself.
element execution method itself.
Utility Methods
String getSubmitURL()
One of the restrictions listed for creating a voice element is to use a Unified CVP-specified URL
when submitting back to VXML Server. This method returns the URL to use. The developer
would use this URL in a
when submitting back to VXML 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 VXML 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.
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
The super-element first creates an instance of the sub-element and then calls this method from