Backend Common Block
The Backend block is used for both routing and voice applications. Use to invoke custom backend Java Server Pages (JSP). You have the option to pass back all the application session state data to the backend logic page on the server. Data being returned will be sent back as a JSON string. Other features:
- Provides a mechanism for creating new backend logic JSP. The added JSP file will have a basic template code already filled out. As the application developer, you will only need to implement a performLogic function. The VXML/SCXML to return back control will be auto-generated in the template.
- User-written custom backend logic pages are stored in the Java Composer Project's src folder. Composer provides standard include files for Backend logic blocks in the Java Composer Project's include folder.
Note: If any custom backend logic pages use libraries, place the libraries in the Java Composer Project's WEB-INF/lib directory. This directory typically contains JAR files that contain Java class files (and associated resources) required for the application. Note: The Tomcat application server should be restarted after changing any JAR files in this folder.
- Composer includes a CHEAT SHEET for creating a Backend logic application as well.
The Backend block has the following properties:
Block Notes Property
The Uri property specifies the http:// page to invoke. To set a URL destination for the Uri property:
- Select the Uri row in the block's property table.
- In the Value field, click the Error creating thumbnail: Unable to save thumbnail to destinationbutton to open the Uri dialog box.
- Select a file from the available projects.
Encoding Type Property
The Encoding Type property (used for callflows only) indicates the media encoding type of the submitted document. GVP 8.1 supports two encoding types:
To select a value for the Encoding Type property:
- Select the Encoding Type row in the block's property table.
- In the Value field, select application/x-www-form-urlencoded or multipart/form-data from the drop-down list.
Note: Parameters cannot be entered until the Uri property is specified. Use the Parameters property to specify parameters to pass to the invoked backend JSP. To specify parameters:
- Click the Parameters row in the block's property table.
- Click the Error creating thumbnail: Unable to save thumbnail to destinationbutton to open the Parameter Settings dialog box.
Add Button Use the Add button to enter parameter details.
- Click Add to add an entry to Backend Parameters.
- In the Parameter Name field, accept the default name or change it.
- From the Parameter Type drop-down list, select In, Out, or InOut:
|In||Input parameters are variables submitted to the Backend application.|
|Out||Output parameters are variables that the Backend application returns and will be reassigned back to the current callflow.|
|InOut||InOut parameters are parameters that act as both input and output.|
- In the Expression drop-down list, select from among the listed variables, type your own expression, or click the Error creating thumbnail: Unable to save thumbnail to destinationbutton to use Skill Expression Builder.
- In the Description field, type a description for this parameter.
- Click Add again to enter another parameter, or click OK to finish.
Delete Button To delete a parameter:
- Select an entry from the list.
- Click Delete.
Pass State Property
Note: This property is used for callflows only. The Pass State property Indicates whether or not to pass the application state to the backend. The application state includes all the variables shown in the Entry block as well as all variables containing returned values from user Input blocks. You can find Instructions on how to access these backend variables in Creating a Backend JSP File and Creating a Backend ASP.NET File. The Parameters property can also be used to pass specific parameters into the backend and, for efficiency reasons, should be considered first. There is also a Cheat Sheet, Creating a Backend Logic Block (Help > Cheat Sheets > Composer > Building Voice Applications). To select a value for the Pass State property:
- Select the Pass State row in the block's property table.
- In the Value field, select true or false from the drop-down list.