Advanced IVR Tutorial Lesson 2: Create a Check Password Java Action
The call flow diagram is shown below:
The Check Password element is the element to call the Java class defined in the previous section.
The Variables for Account Number and Password
Caller enters account number and password in Account Number and Enter Password elements. The values need to be passed to the Java class, invoked from the Java Action defined in the Check Password element. The variables for account number and password are defined in the top element. Right click on the element, select , choose tab. Click the button to define a new variable.
The value of variable account_number is set in the action defined in the Enter Password element as follows:=
__VG__LAST_RESULT__ is a system variable that contains the latest caller input. The value of the variable account_password is defined similarly.
The Java Action
The Java action for checking password is shown below:
Here the JDBC driver (sqljdbc.jar) and the sample Java program (dbinteg.jar) are listed in the Jar Files box. When the Java action is executed by Voicent Gateway, these two jar files will be automatically loaded.
The parameters for the check method are defined in the Parameters box. The Type column defines the method signature check(java.lang.String, java.lang.String), which should match what is defined in the Java class.
When the action is executed the values are passed to the method by Voicent Gateway. Here the value of account_number is passed as the first argument and the value of account_password is passed as the second argument.