Created by: Feroz Syed on 15-10-2009 12:01:03 PM Hi, I am working on SVP Studio 3.1. I was trying to assign a session variable with the value empty, but it is not allowing me to do so. It is showing the error "Session variable value cannot be left blank or contains the characters :<,>,",',and &." I was trying to add a session variable with null value for the following reason: In my application, currently am adding the session variables wherever required in the flow and at at the end of the flow in the subdialog return element, I am logging all these session variables. In this scenario when I call the application and disconnect the call in the middle of the flow, then in the subdiag return element when it is trying to log the session variables, server is throwing the error: SERVER ERROR: WARNING: A substitution string appearing in the element "logCallerOptions" referred to non-existent information (such as element or session data that does not exist). An empty string was substituted instead." I believe this can be resolved if I am able to create the session var in the Subdialog start element with null value. Please help. Regards, Feroz
Subject: Re: New Message from Feroz Syed in Customer Voice Portal (CVP) - General Di Replied by: Janine Graves on 16-10-2009 12:49:26 AM Studio won't let you deploy if a variable's value is not set. But, if you press the space bar (so the value is " " - but without the quotes) then this will set the variable to a blank string.
Cisco Developer Community Forums wrote: > Feroz Syed has created a new message in the forum "General Discussion > - All Versions": > > -------------------------------------------------------------- > Hi, >  > I am working on SVP Studio 3.1. I was trying to assign a session > variable with the value empty, but it is not allowing me to do so. > It is showing the error "Session variable value cannot be left blank > or contains the characters :<,>,",',and &." >  > I was trying to add a session variable with null value for the > following reason: >  > In my application, currently am adding the session variables wherever > required in the flow and at at the end of the flow in the subdialog > return element, I am logging all these session variables. In this > scenario when I call the application and disconnect the call in the > middle of the flow, then in the subdiag return element when it is > trying to log the session variables, server is throwing the error: >  > *SERVER ERROR: WARNING: A substitution string appearing in the element > "logCallerOptions" referred to non-existent information (such as > element or session data that does not exist). An empty string was > substituted instead."* >  > I believe this can be resolved if I am able to create the session var > in the Subdialog start element with null value. >  > Please help. >  >  > Regards, > Feroz > -- > To respond to this post, please click the following link: > > <http://developer.cisco.com/web/cvp/forums/-/message_boards/message/1695495> > > or simply reply to this email.
Subject: RE: Re: New Message from Feroz Syed in Customer Voice Portal (CVP) - Genera Replied by: Feroz Syed on 16-10-2009 10:29:04 AM I know it takes space. Is there any possibility to assign with null value instead blank string?
Subject: RE: Re: New Message from Feroz Syed in Customer Voice Portal (CVP) - Genera Replied by: Jawad Bokhari on 21-10-2009 07:46:57 AM Yes, you can. But you will have to write a very simple java class for this (Java Action Component). Following is a sample java action component for this.
import com.audium.server.AudiumException; import com.audium.server.session.ActionElementData; import com.audium.server.voiceElement.ActionElementBase; public class ClearPromotions extends ActionElementBase { public void doAction(String elementName, ActionElementData data) throws AudiumException { data.setSessionData("YOUR_ATTRIBUTE_NAME", null); // CREATES Session variable with null value data.setSessionData("YOUR_EMPTY_VARIABLE", ""); // CREATES Session variable with empty string } }
You can place an action component of this class in studio and then can check values of these variables whereever you want in the callflow. If you still face any problem, do let me know. Hope this helps. Regards, Jawad
Subject: RE: Re: New Message from Feroz Syed in Customer Voice Portal (CVP) - Genera Replied by: Feroz Syed on 30-10-2009 02:49:55 PM Yes, it worked. Thank you. But I have one concern is that, when I am trying to log the variable which declared with null value in the element General tab(add to log), the server is throwing error warning message APPLICATION LOADING ERROR,10/30/2009 08:06:41, SERVER ERROR: WARNING: A substitution string appearing in the element "PlayAudioFiles" referred to non-existent information (such as element or session data that does not exist). An empty string was substituted instead. But this is not happening if I add that vaiable to log in the java code. -Feroz
Subject: RE: Re: New Message from Feroz Syed in Customer Voice Portal (CVP) - Genera Replied by: Jawad Bokhari on 06-11-2009 10:42:32 AM Feroz: This is only the way CVP implemented it. This is not a bug, but you ca say it a feature. When you log this in the General Tab: CVP developers implemented to generate warning for variables having NULL values or variables that don't exit. But when you log this with your java program, the warning message doesn't appear. Hope this answers your concern. What exactly do you want to do by utilizing null values? Did you get your stuff working now? Jawad
Subject: RE: Re: New Message from Feroz Syed in Customer Voice Portal (CVP) - Genera Replied by: Feroz Syed on 11-11-2009 06:50:35 AM Actually in our environment, CVP apps were generating too many error warnings due to accessing undefind variables. The reason behind using this underfined variables is that we are using XML APIs to get the data from the backend. In the XML response some of the variables (Element data) may not come depending upon the request we made, as a result when we were trying to acces those variables, it was throwing server error warning. As you said, I have developed a java class for null validation, it worked. Thank you for the help. -Feroz
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: