PreviousNextIndex
Creating Call Control Applications with Dialog Designer > Building Call Control Applications > Using Database and Web Service Operations
 
Using Database and Web Service Operations

Database operations and Web Service operations in a call control project are used in a very similar way to how they are used in speech applications. Also, they are defined in the same manner using the same wizards.

Database operations are used to connect and interact with SQL databases. Information can be collected from a caller and then written to the database. Information can also be retrieved from the database to be presented to the caller. See Working with Database Operations.

Web services are Internet-based queries and applications that can be used to perform a wide variety of functions. In Dialog Designer, Web services are invoked with a Web service operation file.

An example Web service can be to enable callers to get stock quotes or weather forecasts for their areas. Or, a Web service to enable callers to find out about the availability of airline flights or hotel reservations. Almost any Web service where information can be presented using audio files or Text-to-Speech can be used in a Dialog Designer application. See Working with Web Services.

At runtime, Dialog Designer will use Dbproxy and Wsproxy proxy classes to invoke Database operations and Web Service operations from within your CCXML content, respectively. Code to invoke Database operations or Web Service operations can be written by hand, or with call control projects. It is recommended to use the available Database operations and/or Web Service operations snippets on the Snippets tab within the CCXML Editor to automatically invoke these proxy classes for you.

The following transition invokes a DBOP by using the DbProxy in a fetch command. An input variable called `id' is created, assigned and then passed in on the namelist as well as the `classname' of the Database operation to invoke.

After the fetch completes, run the Database operation as follows:

Create a variable to obtain the output of the Database operation and results of the invocation. The <script> command invokes the script, runs the Database operation, and sets the output variables as well as the dbResult. In this example, we then use a "Saying" from the database to prepare a prompt to the caller.

For an array, you have to pass in the index:


PreviousNextIndex

©2009, Avaya Inc. All rights reserved.