| How can I create element and session data from an element? |
| Categories: Audium OpenSDK, Audium Studio (3.4.x) |
| Article ID: | 65 |
| Last updated: | January 08, 2007 |
| User Opinions |
|
No users have voted.
|
|
Thank you for rating this answer.
|
SUMMARY
This article explains how almost any element can be used to create session and element data at runtime.
SYMPTOMS
Developer would like to set the value of a variable either stored in element or session data when a particular element is visited in the call flow.
RESOLUTION
While custom Java code (as well as VoiceXML Insert elements, and other types of custom content) can be used to create and modify session and element data, this task can be easily handled from within Audium Studio with no programming required.
All voice elements (i.e elements with a blue cube icon next to them in the Elements pane) have a Data tab in their Element Configuration pane. Using this tab, you can create and update element and session data.
To add element data when this element is visited:
Select the radio button next to "Element" (it is selected by default). Type the name of the variable you would like to store in element data in the "Name" field. Either hard-code a value for this variable by typing it into the "Value" field, or use substitution to dynamically fill the variable at runtime. Set the "Type" drop-down to the type of data you have entered. Change the "Create" drop-down to "After" if you would like the variable to be created after this voice element is done with its work, or to "Before" if you would like it created as soon as the element is visited. Click the "Add" button at the bottom of the pane to record these changes. It is a common mistake to forget to click on the "Add" button. Now, when this element is visited, it will create the variable you have specified, and store it in its element data.
To add session data when this element is visited:
Follow the same instructions above, except choose the "Session" radio button. Note that session data does not store its type, and so you do not need to choose the type from a drop-down. The developer is responsible for tracking which session data contains which data types. As with element data, be sure to click the "Add" button after changing these settings, to save the change.
Note: Depending on your active monitor resolution (e.g. 1024x768), the "Add" button may be partially or completely covered by the "Tasks" pane. If this is the case, reduce the size of the "Tasks" pane so that you have access to the "Add" button.
|
| Visitor Comments |
|
No visitor comments posted. Post a comment
|
| Attachments |
|
No attachments were found.
|