Invoking a state table

Use the Call.invokeStateTable() method to invoke a Blueworx Voice Response for AIX state table. You can only pass string parameters to the state table, so if your state table requires numeric parameters, you need to invoke it from another state table that can accept strings from the Java voice application.

Let’s look at an example. The state table you want to invoke, DBlookup, retrieves a value from a database. It has three parameters:

  1. To invoke a State Table application from a Java application, use the Call.invokeStateTable() method.
  2. In the first parameter, which is the name property, specify the name of the state table (DBlookup).
  3. In the second parameter, which is the entryPoint property specify the state table entry point.
  4. In the third parameter, which is the parameters property, specify in the form of a String array the list of parameters to pass to the State Table application. You can only pass String parameters to the state table. You must include the number of parameters that the state table expects, even if you are not interested in some of the values.
Example:
public void voiceMain() throws WVRException {
  .
  .
  .
  // Invoke the state table
  StateTableResult result = call.invokeStateTable(DBlookup, entryPoint, [customerNumber, accountNumber]);
  .
  .
  .
}