Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: cavagnaro on July 08, 2013, 10:10:55 PM
-
Hi guys,
Having an issue here...
Creating some List Objects, for example List Alpha. This list has 1 Item (Item1) and this item has 2 keys (Key1 and Key2) with values 1 and 2 respectively.
Meaning
(Index)(Key)(Value)
1. Key1 = 1
2. Key2 = 2
Now after a days customer needs to update Key1 value to 6 for example, so using IRD he does such operation.
Now the strategy stops to work as expected...
Why?
Because now if we go to the ListObject it is like this:
(Index)(Key)(Value)
1. Key2 = 2
2. Key1 = 6
The updated key appeared as Index = 2...so when I assign the variable on the strategy (remember it is done by index #) it reads correctly but also wrong as the indexes have been modified and updated in a new order...
Anybody else having this issue or knows if it is as "expected"??? Doesn't make sense to me...Seems IRD does an delete and then add at the bottom instead of an update function...
Comments please
IRD: 8.0.100.12
CfgServer: 8.0.300.30
Thanks!
PS: Checked already RN and couldn't find anything related or possibly linked to an issue like this
-
Damn it...it does a delete and then an insert on the DB but doesn't keep the original index:
[code]
01:06:33.875 Trc 04541 Message MSGCFG_CHANGEOBJECT received from 548 (InteractionRoutingDesigner 'IRD')
MSGCFG_CHANGEOBJECT
attr: SATRCFG_OBJECT value: "1850000ITEM1Key16"
attr: IATRCFG_OBJECTTYPE value: 16 [CfgTransaction]
attr: IATRCFG_REQUESTID value: 679
<CfgTransactionUpdate
DBID="185">
<userProperties
action="change">
<list_pair
key="ITEM1">
<str_pair
value="6"
key="Key1" />
</list_pair>
</userProperties>
</CfgTransactionUpdate>
01:06:33.875 Trc 24211 Object [CfgTransactionUpdate], DBID [185] is to be changed by client, type [InteractionRoutingDesigner], name: [IRD], user: [default]
01:06:33.875 Trc 24218 Transaction [3] is sent on execution
01:06:33.875 DBRequest, handle 209 sent, query :
BEGIN TRANSACTION
01:06:33.875 DBRequest, handle 210 sent, query :
delete from cfg_flex_prop where dbid = 6121
01:06:33.875 DBRequest, handle 211 sent, query :
insert into cfg_flex_prop (dbid, object_dbid, object_type, parent_dbid, prop_name, prop_value, prop_type, part, csid, object_csid, parent_csid) values(6121, 185, 16, 6120, 'Key1', '6', 0, 0, 0, 0, 0)
01:06:33.875 DBRequest, handle 212 sent, query :
insert into cfg_hdb_object (id,oper_type,oper_time,object_type,object_type_id,object_dbid,user_name,user_dbid) values (2098,4,1373342793,'CfgTransaction',0,185,'default',0)
01:06:33.875 DBRequest, handle 213 sent, query :
update cfg_hdb_object set object_data=BLOB DATA(236 bytes) where id=2098
01:06:33.875 DBRequest, handle 214 sent, query :
update cfg_refresh set notify_id = 2098
[/code]
Seems a bug to me...what do you think guys...I'm willing to open an eSR on this issue but would like to confirm it with your ideas
Thanks!
-
Me again hehe
Solved the issue using GetStringKey function...works better.
But still think that messing with the indexes is a bad design...don't you?
-
Hi cavagnaro,
I don't think it is bug. By design items in list object should be referenced by name. Function that allows referencing items by index is added to allow You to iterate through list - nothing more. After all this is list not array :)
-
why don't use ListGetDataCfg function if you know key name?
-
¬¬ ¬¬ ¬¬
Damn it! I hate myself lol
I was following the doc a Genesys guy "taught" me...and he assured me only method was using index number...I took it as "law"...
Now reading well the function definition never says something like that....
Rule #1: Never trust Genesys "experts"...
Rule #2: Read the damn documentation lol slap for me :P
Thanks guys! Made my day 8)