Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: vma on April 06, 2012, 12:25:39 PM

Title: [solved] Deleting nested kvp
Post by: vma on April 06, 2012, 12:25:39 PM
Hi,
I have some attached data from a third party app like:
  appname.keyname 'value'
  appname.date 'value'
  appname.service 'value'
etc...

Is there any way to delete one key of these in IRD?
I tried DeleteAttachedData['appname.service'] with no success.
I tried DeleteAttachedData['appname.*'] and DeleteAttachedData['appname'] to try and delete all of them and still no luck.
How can I delete em?

Thanks,
Mihai
Title: Re: Deleting nested kvp
Post by: kubikle on April 06, 2012, 03:50:58 PM
Its worked for me, meaning deleting constructions like DeleteAttachedData['appname.service'] and
DeleteAttachedData['appname'].
What exactly is not working in your case: no request is sent to tserver, request results TErrorMessage, request looks like Ok but strategy continue to return old adta when asked with UData function, somehting else? 
Title: Re: Deleting nested kvp
Post by: vma on April 06, 2012, 04:56:40 PM
the request is not sent to SIPServer.
The thing is that I tried a test to attach myself from a strategy a key named "appname.service" and it appears in the logs as:

'appname'(list) 'service' 'myservicename'

while when the data attached by the 3rd party app looks like:

'appname.service' 'myservicename'

So I guess that URS gets confused somehow since this key is with '.' but it's not a list. Anyway the DeleteAttachedData function is skiped like it's not even there. no trace of it in URS or SIP logs.

Mihai
Title: Re: Deleting nested kvp
Post by: kubikle on April 06, 2012, 05:46:54 PM
Sorry, I thought it was about real sublists. If it is just about plain keys containing dots indied - probably you are right regular attached data functions cannot help - dot is usderstand as indicvation of nested kvlists.
The only way i see will work -  make URS send deleting request without knowing it - through SendRequest function:

Body= Cat['thisdn:', Dest[], '|connid:', ConnID[], '|referenceid:0|52:appname.service']]
SendRequest[33, Body]

Here 33 is RequestDeletePair, and Body presents necessary attributes for this request : ThisDN, ConnectionID, referenceid, and name of key to be deleted (52 is id of tevent's AttributeDataKey).
I made experiment before sending this mail - at least in my case it works.
   
Title: Re: Deleting nested kvp
Post by: vma on April 09, 2012, 09:58:56 AM
Thank you very much kubikle, exactly what I needed.
Topic closed!

Mihai