Cisco Cisco Customer Voice Portal Downloads 릴리스 노트
C
HAPTER
7:
S
TANDARD
A
CTION
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)
39
Chapter 7: Standard Action Elements
Action elements are responsible for performing some action and returning an indication whether
the action was a success. A pre-built, configurable action element has already defined the actions
to take and only requires a configuration to modify its behaviors. Standard action elements,
however, are defined by the developer and have no configuration since they represent actions
specific to an application.
the action was a success. A pre-built, configurable action element has already defined the actions
to take and only requires a configuration to modify its behaviors. Standard action elements,
however, are defined by the developer and have no configuration since they represent actions
specific to an application.
A standard action element, in addition to the functionality provided all components, is allowed to
create and modify element data. It can also act as a flag if desired.
create and modify element data. It can also act as a flag if desired.
Using the Java API
A standard action element is built in Java by extending the abstract base class
ActionElementBase
found in the
com.audium.server.voiceElement
package (this package’s
name is such due to backwards compatibility considerations). It contains a single abstract method
named
named
doAction
, that acts as the execution method for the action element, and must be
implemented by the developer. The method receives two arguments: the name of the action
element (as a
element (as a
String
) and an instance of
ActionElementData
. This class belongs to the Session
API and is used to access session information (See Chapter 3: Session API for more on this
API). The method does not expect anything in return because all action elements have a single
exit state (“done”). It is expected that should an unrecoverable error occur, an
API). The method does not expect anything in return because all action elements have a single
exit state (“done”). It is expected that should an unrecoverable error occur, an
AudiumException
is thrown.
The
ActionElementBase
class defines many methods in addition to
doAction
. These are used
for configurable action elements, which also extend the class. The only method required for
standard action elements is
standard action elements is
doAction
, as it is the only abstract method in
ActionElementBase.
Using the XML API
As described in Chapter 3: Session API, the standard “inputs” and “settings” XML documents
are sent via POST to the standard action element URI. An additional parameter, called “name”,
is sent containing the name of the action element. Figure 7-1 shows the DTD diagram of the
XML document that must be sent in response. The DTD for the standard action element response
is defined in the file
are sent via POST to the standard action element URI. An additional parameter, called “name”,
is sent containing the name of the action element. Figure 7-1 shows the DTD diagram of the
XML document that must be sent in response. The DTD for the standard action element response
is defined in the file
ActionResponse.dtd
found in the VXML Server
dtds
folder.