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.
Created by: null on 07-03-2007 07:05:54 PM I'm trying to use a dynamic configuration class on an element. However, when I add session data to be saved before entering the element, that session data is not accessible in the dynamic configuration java class. It seems like the settings in the settings tab that are set in the GUI are loaded before the dynamic class though, so I would think that what is in the data tab would also be set beforehand as well. Is this a bug? Is there another way around this, other than setting session data prior to entering this element via either a java class, setting data after exiting an element, or having one class file per element with the necessary settings hard-coded? Also, I am using Audium 5.1.3.
Thanks in advance for any help.
Subject: RE: Dynamic Configuration Precedence Problem Replied by: null on 09-03-2007 09:41:07 PM Hi,
An element is not completely configured and ready to execute until the dynamic configuration class is loaded and returns the final configuration. Therefore the session data you are trying to access will not be created at the point in which you are trying to access it.
With that said, you can still access this information through the com.audium.server.xml.VoiceElementConfig instance passed to the dynamic configuration class. There are two methods you can call:
1) public Object getSessionDataValue(String sessionData) - This method returns the value of session data set in Audium Studio without evaluating any substitution specified there.
2) public Object getSessionDataValue(String sessionData, ElementAPI elementAPI) - This method returns the value of session data set in Audium Studio after evaluating any substitution specified there.
Hope this helps, Roberto
Subject: RE: Dynamic Configuration Precedence Problem Replied by: Janine Graves on 11-03-2007 04:14:28 PM Hi Roberto,
Can you make this more precise? I was under the impression that at runtime, Call Services read the information in the Settings and Audio tabs and sent that information into the Dynamic Configuration and then executed the element code.
When do the Data tab (create Before) and the General tab (Add to Log - create Before) execute in this process?
Is it like this: Settings Tab read and variables substituted where necessary Audio Tab - audio items instantiated Dynamic Configuration Code executed (with Base Configuration passed to it, if specified) Data Tab executes (if data added Before) General Tab - Add to Log executes (if data is to be logged Before) And THEN the element executes.
Subject: RE: Dynamic Configuration Precedence Problem Replied by: null on 16-03-2007 01:57:53 PM Hi Janine,
The dynamic configuration class basically changes the object that holds an element's configuration (where you have a base configuration) or creates a new configuration object (where you have no base configuration). Therefore, at the time the dynamic configuration class is run, the static configuration entered in Studio is still in its "raw" form and has not been seen by Call Services. A dynamic configuration is a way for the user to intercept a static configuration made in Studio and add to or modify it before it gets to Call Services.
Based on the scenario you described, Call Services would take the following steps for executing a dynamic configuration:
1. The base configuration is loaded. This includes all static configuration. 2. Base configuration is passed to the dynamic configuration Java class. 3. Dynamic configuration code is executed. This adds to or modifies the base configuration based on business logic. 4. A new configuration is returned to Call Services. 5. Data Tab executes (if element and/or session data is configured to create before the element code is executed). 6. General Tab - Add to Log executes (if data is configured to be logged before the element code is executed). 7. Call Services passes the new configuration to the element. 8. The element code is executed. 9. Any data that is configured to be created after the element code is executed, is created.
For more details on dynamic element configurations, please refer to Chapter 6 of our Programmer Guide.
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: