cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
580
Views
0
Helpful
0
Comments
cdnadmin
Community Member
This document was generated from CDN thread

Created by: Ryam Hilfers on 01-11-2011 05:54:17 PM
I am looking for some guidance into the feasability of this approach.
 
I have a requirement to gather a good sized chunk of data from a web service and then immeadiately set some ECC variables before continuing on with caller treatment.
 
Right now, this causes me to return the entire web service response to ICM via FromExtArray data (the elements in this arrary are now full), set the required ECC variables via set nodes and then jump back into the customer dialogue via a VXML server application, passing back in data via ToExtArray I originally had from the webservice call.
 
Ideally, I would be able to stay within CVP and jump from menu application to menu application passing the WS data via ApplicationTransfers but needing to set ECC variable PRIOR to the IVR poriton of the call is business critical.
 
As this web service response grows, I realize I'm up against a finite threshold of ECC var space and also struggling with a much more elegant solution to this.
 
The best idea so far is to use a sort of global hashmap with the global variables , so I can store this information initially and then return to it later(basically immeadiately) based on callid, however this creates a number of questions:
 
Basically I would like this functionality:
 
Hit WS and store data to wsdatastring = "Whatever the WS returned" into global with "data.getApplicationApi.setGlobalData("call" + callid, wsdatastring);"
I can then, after returning back to ICM routing script and then back to a VXML Server application use: "data.getApplicationApi.getGlobalData("call"+callid);" to get the data back and go through CVP normally. 

This raises a few questions:
1. How can I 'release/clear/purge' a single variable from global data.. assuming I would need to do this so-as not to run out of JVM memory as I'm unsure of when garbargecollector will release the object.  Can I set the var to NULL and achieve the same effect?
2. I see this working only by having an On Call End class which removes ("call" + callid) data by setting to NULL, are there instances when this class would not run?
3. Is the best place to monitory JVM memory the CVP Statistics page on Ops Console?
 
Any other thoughts to this approach on why it may or probably wouldn't work?
 
Thanks in advance for the responses.
 
data.getApplicationApi.getGlobalData(testvar) for globaldata

Subject: RE: Utilizing global data
Replied by: Ryam Hilfers on 01-11-2011 06:44:48 PM
I see   ".removeGlobalData(String arg0) method in CallStudio for the getApplicationApi() method.   Assuming I could use this to clear global variables from memory after use, the question again comes back to limits of global variable data.. 

Is there a way to tell how much space I have available? A way to monitor the usage? Assuming Cisco has some "supported" constraints around configuring JVM memory..  anyone know about those?

Thanks again,
Ryan

Subject: RE: New Message from Ryam Hilfers in Customer Voice Portal (CVP) - CVP - Al
Replied by: Ryam Hilfers on 01-11-2011 07:30:00 PM
Need more info on your exact reqs. Anyways, why don't you just store the data you get from Webservice into session data. That way you don't need to pass it from element to element.

Then just use the data you need and pass it to ECC variable.
Does your app require going from CVP to ICM and then back to CVP.  If so, then may need to use another approach. Give me more info on the kind of data you are talking about ?
Hemal

 
 
Right, the requirement here is to go from CVP to ICM and then back to CVP, from here Session variables work just fine. But currently I'm passing the entire response from the web service back to ICM and then back to CVP via the  TO/FROM ExtArrays..   I would like to avoid that somehow. 
 
Requirement is to consume data from a webservice, PRIOR to IVR treatment, store some key data such as SourceCode/BusinessPartner Key etc..  to a few ECC variables and then start interacting with the customer. Problem is that the Web Service response also contains many dynamic points in the IVR, such as what message to play, what options there are, action key, etc.  I could easily set this all as session data and move between apps but I need to jump to ICM to set the ECCs because business does not want to lose the valuable data should the caller drop out mid-IVR.
 
Thanks Hemal

Subject: RE: New Message from Ryam Hilfers in Customer Voice Portal (CVP) - CVP - Al
Replied by: Hemal Mehta on 01-11-2011 07:40:32 PM
Ok, one approach and if you do not want to store this in global variable and worry about  memory issues. This is assuming that the data is not a lot. You can write to xml based file while in CVP and store it local file system. You will need to have a identifier which will be used back and forth to identify this and then when you come back from ICM to CVP, parse this XML file and get the data back. It should be very quick in terms of speed.
Once the call is done, you can purge this XML file, if you do not need it anymore or store the contents in DB if needed.
Hemal
________________________________
From: Cisco Developer Community Forums [cdicuser@developer.cisco.com]
Sent: Tuesday, November 01, 2011 6:30 PM
To: cdicuser@developer.cisco.com
Subject: New Message from Ryam Hilfers in Customer Voice Portal (CVP) - CVP - All Versions: RE: New Message from Ryam Hilfers in Customer Voice Portal (CVP) - CVP - Al

Ryam Hilfers has created a new message in the forum "CVP - All Versions":

--------------------------------------------------------------
Need more info on your exact reqs. Anyways, why don't you just store the data you get from Webservice into session data. That way you don't need to pass it from element to element.

Then just use the data you need and pass it to ECC variable.
Does your app require going from CVP to ICM and then back to CVP. If so, then may need to use another approach. Give me more info on the kind of data you are talking about ?
Hemal



Right, the requirement here is to go from CVP to ICM and then back to CVP, from here Session variables work just fine. But currently I'm passing the entire response from the web service back to ICM and then back to CVP via the  TO/FROM ExtArrays..   I would like to avoid that somehow.

Requirement is to consume data from a webservice, PRIOR to IVR treatment, store some key data such as SourceCode/BusinessPartner Key etc..  to a few ECC variables and then start interacting with the customer. Problem is that the Web Service response also contains many dynamic points in the IVR, such as what message to play, what options there are, action key, etc.  I could easily set this all as session data and move between apps but I need to jump to ICM to set the ECCs because business does not want to lose the valuable data should the caller drop out mid-IVR.

Thanks Hemal
--
To respond to this post, please click the following link:

<http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/4705010>

or simply reply to this email.

Subject: Re: New Message from Ryam Hilfers in Customer Voice Portal (CVP) - CVP - Al
Replied by: Janine Graves on 01-11-2011 07:53:32 PM
Ryan, you can possibly acco plish this using the reqICMlabel node. This 
execs as a decision element in studio and lets you pass data into pv1-pv10 
as well as into the caller_input and fromextvxml array.

The catch is that it hits icm as a 'new call' for the original dnis. So you 
have to pass a value from Studio into pv1 (for example) and have the routing 
script start by checking if pv1 equals that value. If so, its a reqICMlabel 
so ICM can store the data and then return back to studio using a label node. 
If not, its a new call and you set the call type as new call.  Have to be 
careful about reporting though.

Janine

Only problem


Sent from my Verizon Wireless Phone

-----Original message-----
From: Cisco Developer Community Forums <cdicuser@developer.cisco.com>
To: "cdicuser@developer.cisco.com" <cdicuser@developer.cisco.com>
Sent: Tue, Nov 1, 2011 23:30:01 GMT+00:00
Subject: New Message from Ryam Hilfers in Customer Voice Portal (CVP) - CVP 
- All Versions: RE: New Message from Ryam Hilfers in Customer Voice Portal 
(CVP) - CVP - Al

Subject: RE: New Message from Ryam Hilfers in Customer Voice Portal (CVP) - CVP - Al
Replied by: Greg Worm on 02-11-2011 10:38:01 AM
You could pass back the ECC variables in your On Call End custom code.  Here is a code snipit of how to do it.
String status = callEndAPI.getHowCallEnded();
if( status.equals("hangup") ) {
   try {
VPreference pref = callEndAPI.getPreference();
VMain vxml = VMain.getNew(pref);

VForm ret_form = VForm.getNew(pref, "custom_subdialog_return");
VBlock ret_blk = VBlock.getNew(pref);

ret_blk.add(VAction.getNew(pref, VAction.VARIABLE, "caller_input", (String)callEndAPI.getSessionData("CallerInput"), VForm.WITH_QUOTES));
ret_blk.add(VAction.getNew(pref, VAction.VARIABLE, "FromExtVXML0", (String)callEndAPI.getSessionData("VXML0"), VForm.WITH_QUOTES));
ret_blk.add(VAction.getNew(pref, VAction.VARIABLE, "FromExtVXML1", (String)callEndAPI.getSessionData("VXML1"), VForm.WITH_QUOTES));
ret_blk.add(VAction.getNew(pref, VAction.VARIABLE, "FromExtVXML2", (String)callEndAPI.getSessionData("VXML2"), VForm.WITH_QUOTES));
ret_blk.add(VAction.getNew(pref, VAction.VARIABLE, "FromExtVXML3", (String)callEndAPI.getSessionData("VXML3"), VForm.WITH_QUOTES));

ret_blk.add(VAction.getNew(pref, VAction.RETURN, "caller_input FromExtVXML0 FromExtVXML1 FromExtVXML2 FromExtVXML3"));

ret_form.add(ret_blk);
vxml.add(ret_form);

callEndAPI.setCustomVxmlResponse(vxml);

   } catch (VException ex) {                   
ex.printStackTrace();
   }catch (Exception ex) {                   
ex.printStackTrace();
   }
}

Subject: RE: New Message from Ryam Hilfers in Customer Voice Portal (CVP) - CVP - Al
Replied by: Hemal Mehta on 01-11-2011 07:20:32 PM
Need more info on your exact reqs. Anyways, why don't you just store the data you get from Webservice into session data. That way you don't need to pass it from element to element.

Then just use the data you need and pass it to ECC variable.
Does your app require going from CVP to ICM and then back to CVP.  If so, then may need to use another approach. Give me more info on the kind of data you are talking about ?
Hemal
________________________________
From: Cisco Developer Community Forums [cdicuser@developer.cisco.com]
Sent: Tuesday, November 01, 2011 4:54 PM
To: cdicuser@developer.cisco.com
Subject: New Message from Ryam Hilfers in Customer Voice Portal (CVP) - CVP - All Versions: Utilizing global data

Ryam Hilfers has created a new message in the forum "CVP - All Versions":

--------------------------------------------------------------
I am looking for some guidance into the feasability of this approach.

I have a requirement to gather a good sized chunk of data from a web service and then immeadiately set some ECC variables before continuing on with caller treatment.

Right now, this causes me to return the entire web service response to ICM via FromExtArray data (the elements in this arrary are now full), set the required ECC variables via set nodes and then jump back into the customer dialogue via a VXML server application, passing back in data via ToExtArray I originally had from the webservice call.

Ideally, I would be able to stay within CVP and jump from menu application to menu application passing the WS data via ApplicationTransfers but needing to set ECC variable PRIOR to the IVR poriton of the call is business critical.

As this web service response grows, I realize I'm up against a finite threshold of ECC var space and also struggling with a much more elegant solution to this.

The best idea so far is to use a sort of global hashmap with the global variables , so I can store this information initially and then return to it later(basically immeadiately) based on callid, however this creates a number of questions:

Basically I would like this functionality:

Hit WS and store data to wsdatastring = "Whatever the WS returned" into global with "data.getApplicationApi.setGlobalData("call" + callid, wsdatastring);"
I can then, after returning back to ICM routing script and then back to a VXML Server application use: "data.getApplicationApi.getGlobalData("call"+callid);" to get the data back and go through CVP normally.

This raises a few questions:
1. How can I 'release/clear/purge' a single variable from global data.. assuming I would need to do this so-as not to run out of JVM memory.
2. I see this working only by having an On Call End class which removes ("call" + callid) data.
3. Is the best place to monitory JVM memory the CVP Statistics page on Ops Console?

Any other thoughts to this approach on why it may or probably wouldn't work?

Thanks in advance for the responses.

data.getApplicationApi.getGlobalData(testvar) for globaldata
--
To respond to this post, please click the following link:

<http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/4704678>

or simply reply to this email.

Subject: RE: Re: New Message from Ryam Hilfers in Customer Voice Portal (CVP) - CVP
Replied by: Ryam Hilfers on 02-11-2011 11:56:35 AM
Hemal,

Thank you for the suggestion, I like it. However, wondering what the limitations are on writing to a single xml file w/multiple concurrent callers...  perhaps there may be a need to make an individual xml for each call...

Janine,

Again thank you for the suggestion, I think the reporting impacts are going to steer me away from that approach.

Greg,

I'll test this approach and see if I can set more than just the  caller_input and ExtArrays, because that is what I would really need. Either way, thank you for sharing that, very helpful!

Ryan

Subject: RE: Re: New Message from Ryam Hilfers in Customer Voice Portal (CVP) - CVP
Replied by: Hemal Mehta on 02-11-2011 06:20:07 PM
Hemal,

Thank you for the suggestion, I like it. However, wondering what the limitations are on writing to a single xml file w/multiple concurrent callers...  perhaps there may be a need to make an individual xml for each call...

Janine,

Again thank you for the suggestion, I think the reporting impacts are going to steer me away from that approach.

Greg,

I'll test this approach and see if I can set more than just the  caller_input and ExtArrays, because that is what I would really need. Either way, thank you for sharing that, very helpful!

Ryan

 
Ryan,
        You do not want to write a single file. Just generate a file per call and you can always purge the file after you are done. You will just need to have the file name generated with a unique identified which will be used from CVP->ICM ->CVP to retrieve the same file and read the data.
Just make sure you take care of all conditions and this should work pretty well, without any memory issues etc.
How many calls does your app receive in day ?
 
Hemal
 
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