Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: GregorV on March 07, 2018, 10:08:47 PM

Title: SOLVED URS: unexpected behaviour when adding a target
Post by: GregorV on March 07, 2018, 10:08:47 PM
I have a strategy that calls a sub multiple times. In the sub there is a SelectDN. If an agent is available->OK, if not, the sub returns and will be called again with another target. I expect that now both targets are active so that when the last call to that sub does a SuspendForDN any agent form one of the previously selected targets will get the call when he changes to ready.
What I see, is what I would expect, if there is a ClearTargets function in between but there isn't.
Here a log snippet from the second call to the sub after the SelectDN:
[code]10:51:57.830_M_I_05e602b77502713a [13:03] call (vq 5b8f028, id=388, priority 10034) doesn't wait for VQ bad1df8 (name="TMD_Schul_TR_IT_2" stats=20 20 1 1520416317.830) now (0)
10:51:57.830_M_I_05e602b77502713a [13:03] call (vq 5b8f028, id=388, priority 10034, time 1520416317.790) waits for VQ bad11b0 (name="TMD_Schul_TR_IT_2") now (0 1520416317.830)
[/code]
The first target is removed for the call and the call now waits only for the second target.
I would apprechate a hint where to look at.
AND btw. which in more curious: in another strategy exactly the same structure works fine.

Thanks
Gregor
Title: Re: URS: unexpected behaviour when adding a target
Post by: terry on March 07, 2018, 11:54:50 PM
If you need single target selection object/function to accumulate targets (when looping) use MultiplyTargets[true] function.
Title: Re: SOLVED URS: unexpected behaviour when adding a target
Post by: GregorV on March 08, 2018, 09:49:37 AM
Hi terry,

thanks, that was the solution.
I came across MultiplyTargets some time ago, but as my loops worked as expected at that time, I forgot it.
In fact, the other strategy construct, which I mentioned above did not use a loop, but was calling the sub with SelectDN multiple times in sequence - similar to the sample in the URS reference guide.

regards,
Gregor