cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
117
Views
0
Helpful
0
Comments
cdnadmin
Community Member

Subject: Re: New Message from Ruzel Jamilon in Customer Voice Portal (CVP) - General
Replied by: Janine Graves on 07-08-2013 09:52:10 AM
You are creating Element data, the error message says that you're trying to access it as 'Session data'   -- that's the problem. It's a mismatch in the type of variable being created vs. being accessed. On 8/7/2013 10:48 AM, Cisco Developer Community Forums wrote: element,warning,A substitution representing Session data named "One.AudioFile" referred to non-existent information. An empty string was substituted instead. -- Janine Graves
This document was generated from CDN thread

Created by: Ruzel Jamilon on 07-08-2013 09:48:06 AM
We made a custom DB element which gets multiple rows of result and sets each as element data

while (rs.next()){
    
for (int i = 1; i <= rsmd.getColumnCount(); ++i){    
if (i == 1){
  elementKey = rs.getString(i) + ".";
}else{
  actionData.setElementData( elementKey+rsmd.getColumnName(i),  rs.getString(i));
  actionData.addToLog(elementKey+rsmd.getColumnName(i), rs.getString(i));
}
}
}

And I can see by adding to log that it is in fact getting the desired elementVariableName and value:

ALL_BB_Main_Res_Get_Audio_Files,enter,
ALL_BB_Main_Res_Get_Audio_Files,custom,One.AudioFile,For_1.wav
ALL_BB_Main_Res_Get_Audio_Files,custom,Two.AudioFile,For_2.wav
ALL_BB_Main_Res_Get_Audio_Files,custom,errorFlag,0
ALL_BB_Main_Res_Get_Audio_Files,exit,done

but the next element that references this values is showing this error:

element,warning,A substitution representing Session data named "One.AudioFile" referred to non-existent information. An empty string was substituted instead.

We also tried putting the element name for reference but still getting the same error:
element,warning,A substitution representing Session data named "ALL_BB_Main_Res_Get_Audio_Files.One.AudioFile" referred to non-existent information. An empty string was substituted instead.

Did I miss something in my code when I was setting the element data?

Subject: RE: Re: New Message from Ruzel Jamilon in Customer Voice Portal (CVP) - Gen
Replied by: Ruzel Jamilon on 07-08-2013 10:05:44 AM
Thanks Janine. I didnt know there was a difference.
I changed our code to :

actionData.setSessionData( elementKey+rsmd.getColumnName(i),  rs.getString(i));

Waiting for the testers to retest and hopefully it wont have any error.

Subject: Re: New Message from Ruzel Jamilon in Customer Voice Portal (CVP) - General
Replied by: Janine Graves on 07-08-2013 11:41:10 AM
You should look in the Studio Help > Help Contents > Call Studio Users Guide for information on using the Studio Debugger. It let's you see the value of the different variables you're creating (or think you are creating). You can also see the URLs that you would be sending to the gateway to be spoken. 1.In the Studio Navigator window, you should be able to highlight the name of the Studio application and right-click to select Debug Call Studio Project. 2.This brings up the Debug Perspective - which is a Call Simulator. 3.In the bottom right, you should be able to press the Connect button to simulate a phone call. 4.After you simulate the phone call, you can see a list of elements that have executed in the upper-left box. They appear in reverse order, so the Start is at the bottom, the last element executed is top in the list. 5.When you click on the different elements that have executed, then in the upper-right box you'll see your Element and Session data. 6.To Terminate the Debugger, press the RED SQUARE. To go back to Builder (Studio), click the box labelled  Builder  in the upper-most right corner of the screen. 7.This is a very useful tool to see variables and errors. 8.If you get errors, you can look in the Debugger's directory C:\cisco\callstudio\eclipse\plugins\com.audiumcorp.studio.Debug.Runtime_xxx\AUDIUM_HOME\applications\appname\logs directory.

Subject: RE: Re: New Message from Ruzel Jamilon in Customer Voice Portal (CVP) - Gen
Replied by: Ruzel Jamilon on 07-08-2013 11:30:21 AM
I am still getting the same error - although I doubt that the new jar file is being loaded because I made out some tomcat logs and I dont get any of those. I put out some application logs and is again waiting for the tester and while I wait I am reading about setting sessiondata.. and I cant seem to see any mistake in the line of code that I made, but maybe you guys can point out if I have something missing:


if (type.equals("multiple")){
ps = conn.prepareStatement(query);
rs = ps.executeQuery();
ResultSetMetaData rsmd = rs.getMetaData();


String elementKey = "";
String varName = "";
while (rs.next()){
 
  for (int i = 1; i <= rsmd.getColumnCount(); ++i){    
   if (i == 1){
    elementKey = rs.getString(i) + ".";
   }else{
    varName = elementKey+rsmd.getColumnName(i);
    actionData.addToLog(name, varName);
    actionData.setSessionData( elementKey+rsmd.getColumnName(i),  rs.getString(i));
    //actionData.setElementData( elementKey+rsmd.getColumnName(i),  rs.getString(i));
    actionData.addToLog(elementKey+rsmd.getColumnName(i), rs.getString(i));
   
   }
  }
}
actionData.addToLog("ShawDB", "testLog");
System.out.println("ShawDB " + name +" "+ varName);

if (elementKey.equals("")){
  actionData.addToLog("Resultset received is empty", "");
}
actionData.addToLog("errorFlag", "0");
actionData.setElementData("errorFlag", "0");

return;
}
Also, Do we need to open up the IVR and referesh all the DB elements there to have the change take effect?
Any other possible reason that might be causing this error?
Thank you!

Subject: RE: Re: New Message from Ruzel Jamilon in Customer Voice Portal (CVP) - Gen
Replied by: Ruzel Jamilon on 07-08-2013 11:46:43 AM
Thank you so much Janine.

I would love to be able to use those - but currently all I have access to is an eclipse. I decompile Cisco's jars file, try to learn how they do, compile custom elements, give it to tester and hope it works.

But I will make sure that I learn that once they free up the resources (non prod for me to test into)
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