Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
[b]This document was generated from CDN thread [/b] [b]Created by: [/b]null [b]on [/b]08-12-2003 10:30:35 PM Hi All, I have created a custom element for the initialisation of session data. The idea of this was to be able to change specific bits of session data that may be context senstive - prompts etc... in a central location to be used during the call flow. To do this I customised an Action element, and added a few things to it however a number of strange things occur. It works the first time the call enteres a particular Audium page - session data is initialised no problems - however if the call ever needs to RE-enter a particular page this element seems to stop working. Instead I receive only information from the PREVIOUS audium page. Can anyone tell me what's going wrong? I've attached my custom element for your information. Cheers Bernard [b]Subject: [/b]RE: Custom element for Initialise session data not working [b]Replied by: [/b]null [b]on [/b]09-12-2003 03:07:02 PM A couple of notes about the action element you sent: [*] You can avoid having to check for null for the settings by making the settings required. That way the Builder will make sure they have a value. You could do that with the FromData, FromDataType, ToData, and ToDataType settings and leave the other ones optional. [*]The code at the end that returns when ReturnFlag or ReturnFlag1 are â¿¿yesâ¿¿ is unnecessary. The action element will return in any case. [*]When you refer to element data, you assume the name of the element data variable is â¿¿valueâ¿¿. This is not always the case and if you try to get element data from an element that does not use â¿¿valueâ¿¿, this action element would not function. Many Audium elements do store their results in element data named â¿¿valueâ¿¿, but some do not (such as the Counter action element which stores the count in element data named â¿¿countâ¿¿). Additionally, there may be other element data you wish to obtain, such as all the element data stored by the Form element. I would recommend that you make an additional setting called â¿¿Element Data Nameâ¿¿ or something that takes the name of the element data. You could even make this setting dependent on the FromDataType being â¿¿ElementDataâ¿¿, so it is easier to configure the element. To see the names of element data you can refer to the element specifications or the document named Element Listing.pdf in the Audium 3.3 developer resources forum ([url=http://www.audiumcentral.com/supportcenter/viewtopic.php?t=228]http://www.audiumcentral.com/supportcenter/viewtopic.php?t=228[/url]). [*]Due to the way the logic is written here, if any of the settings are null, this action element does nothing. Since you visit the element multiple times, doing nothing means the old element data is still around, so that would explain the behavior. You can place System.out.println statements in the action element, recompile, and run again. The print statements will appear in the console window for most application servers (Tomcat, for one) and you can see what the action element does. Everything else seems to be ok. If the above items donâ¿¿t fix the problem, Iâ¿¿d need to know how you are using the element in order to see why it is not working.
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: