cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
224
Views
0
Helpful
0
Comments
cdnadmin
Community Member
This document was generated from CDN thread

Created by: null on 06-05-2003 04:29:39 PM
I've looked at the javadocs but I cannot seem to figure out how to have an action retrieve an element's data. For instance, if I have a getPhoneNumber voice element (which appears to store the spoken number in a variable named 'value') follwed by an action element, how can the action element retrieve or access the the previous element's 'value'?

I'm also very unclear on what the data tab is used for. I'm going to make another pass through the docs to see if I missed something.

Thanks.

Subject: RE: Getting element data
Replied by: null on 06-05-2003 06:27:03 PM
Hi,

The ActionElementData object passed as input to an action element contains all the methods needed to get information about the call, including Element Data. There is a method called "getElementData" that you would use. So in your case it would be:

String myElementData = data.getElementData("getPhoneNumber", "value");

This method is actually defined in the APIBase class that is extended by ActionElementData.

The Data tab has a fwe specific uses. The first is as a way to create hard-coded variables for use in the resto of the application. Say you want a non-developer to control some behavior of the application (for example whether comments are printed to the application server console window), you can create a variable in the Data tab so that that person can change the variable, save and deploy in the Builder and change things without having to do any coding or compiling.

The second use would be to use as a "placeholder" for an as-yet-unfinished element. You know that the element is expected to , say, go to a backend system and retrieve the name of a person. You haven't built that element yet, so you replace it with an Audio voice element which says something like "this is where I would normally go to the backend system", and you configure the Data tab to hardcode a name of a person. That way, you can test the rest of the application without having to wait until that element is finished.

Audium will have a feature in the next release which takes this one step further and allows you to bypass elements without having to take the extra step of using a placeholder. The Data tab will feature prominently in this new feature.

Hope this helps!
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links