« Back to CVP - All Versions

Is there any challenge in passing a hasmap value from module to module?

Combination View Flat View Tree View
Threads [ Previous | Next ]
Hi,
 
I am just trying to pass a simple hashmap from module to module via a subdialog invoke and return.
 
It seems, hasmap is not passed between modules as i could see the hasmap's value in the called module is 'null'.
 
when i tried to pass two params from module ot module
1. a String as MyKey=MyValue
2. and a hashmap with value pair as {key=value}
 
And debug logs shows as below
 
------ Request HTTP Arguments ------
Parameter Name = "{key"  Parameter Value #0 = "value}"
Parameter Name = "audium_vxmlLog"  Parameter Value #0 = ""
Parameter Name = "MyKey"  Parameter Value #0 = "MyValue"
 
But in ActivityLogs only String value is passed and the Hashmap is null.
 
Did any body experienced the same.. CVP version is 8.5

I am pretty sure that with a Subdialog Invoke, you can NOT pass java objects, only strings. I am pretty sure that this is a limitation of VoiceXML itself, and not a Cisco-imposed limitation. You could use custom Java and store (and then retrieve) the Hashmap using "Global Data" (which persists between phone calls). But, you'll have to use the callid (or some other unique identifier) to correlate the hashmap with that particular phone session, since Global Data is 'global' - ie, available to all calls to all apps. On 10/24/2011 3:13 AM, Cisco Developer Community Forums wrote: ilias basha has created a new message in the forum "CVP - All Versions": -------------------------------------------------------------- Hi,  I am just trying to pass a simple hashmap from module to module via a subdialog invoke and return.  It seems, hasmap is not passed between modules as i could see the hasmap's value in the called module is 'null'.  when i tried to pass two params from module ot module 1. a String as MyKey=MyValue 2. and a hashmap with value pair as {key=value}  And debug logs shows as below  ------ Request HTTP Arguments ------ Parameter Name = "{key" Parameter Value #0 = "value}" Parameter Name = "audium_vxmlLog" Parameter Value #0 = "" Parameter Name = "MyKey" Parameter Value #0 = "MyValue"  But in ActivityLogs only String value is passed and the Hashmap is null.  Did any body experienced the same.. CVP version is 8.5 -- To respond to this post, please click the following link: <http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/4640903> or simply reply to this email. -- Janine Graves

Hi Janine,

Thanks for your suggestion.

I was just trying to understand if the usage of global memory for the data to be passed between modules can exceed the limit of Global memory(from earlier posts i learnt that there is a limit(?) ), also wants to know if this is the best way of achieving data passing between modules across industry.

You mention "the limit of Global memory(from earlier posts i learnt that there is a limit(?) " - can you paste the link for the earlier post about limits on global memory? I wasn't aware of any, other than tomcat or vxml server limitations? On 10/24/2011 9:25 AM, Cisco Developer Community Forums wrote: the limit of Global memory(from earlier posts i learnt that there is a limit(?) -- Janine Graves

Just an FYI, you can use use data.getApplicationApi.getGlobalData(testvar) for globaldata in your java code
Also believe there is some flexibility on the memory settings for Tomcat. That may be configurable. Will try and confirm.