" /> Email Routing Strategy terminates after looping - Genesys CTI User Forum

Author Topic: Email Routing Strategy terminates after looping  (Read 2567 times)

Offline awernham

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Email Routing Strategy terminates after looping
« on: June 08, 2010, 12:47:55 PM »
Advertisement
We have an email routing strategy that copies data from the email header, and carries out a loop to remove formatting characters from the string, leaving only hexadecimal digits in the string.

However, when the string is a little over 2500 characters long (a very unusual circumstance- almost all are only about 20 characters or so), the routing strategy appears to terminate, as the following appears in the router log:

WARNING: Attention! It looks like some branch of strategy
        <*0x65*CIM MASP Non-Voice Routing Rel 2_3 v3_1> has tendency to cycling.
        Call following this strategy takes a lot of CPU time
        and prevents another calls to be handled.
        Please check and modify strategy <*0x65*CIM MASP Non-Voice Routing Rel 2_3 v3_1>.

WARNING: Attention! Call <008201cf2915fdc4> will be terminated.

The problem with this is that the interaction is default routed back to the same routing point, and this means that the interaction is stuck, and the router is thrashing.

Is there a way of disabling this check, or increasing the number of iterations before the strategy is terminated?
An option value we can change?

Please do not respond if you are recommending a strategy rewrite, an application upgrade, or are just asking why the hell we are doing it.
Helpful responses only please. Many thanks.

Offline awernham

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: Email Routing Strategy terminates after looping
« Reply #1 on: June 09, 2010, 08:26:33 AM »
I have had a response from Genesys on this, which I am posting here, as this is not documented anywhere, but it useful to know:

Technically, URS maintains two internal counters for each interaction.

·        Asynchronous Counter

·        Synchronous Counter

Both counters are incremented every time the interaction enters a block in the strategy.

·        Asynchronous Counter

Tracks the grand total number of blocks entered in executing the strategy. Never reset, it can only grow. No upper limit. When asynchronous counter reaches the threshold of 10,000, a warning message is written to URS log:

URS prior to 7.6.100.xx:

WARNING: Attention! It looks like some branch of strategy
    <*0x65*MY_STRATEGY> has tendency to cycling.
      Call following this strategy takes a lot of CPU time
      and prevents another calls to be handled.
      Please check and modify strategy <*0x65*MY_STRATEGY>.

After reaching the 10,000 threshold, the strategy is continued.

·        Synchronous Counter

Tracks the number of blocks executed without allowing other interactions being handled.  Gets reset every time URS suspends and resumes the strategy. 

00:47:00.510_I_I_006601c0e4245004 [09:04] <<<<<<<<<<<<suspend interpretator(xxxxxx), timers:nnnnn
...
00:47:01.010_I_I_006601c0e4245004 [09:05] >>>>>>>>>>>>resume interpretator(0)

Strategy can be suspended for many reasons:

§  wait for statistics to be opened

§  wait for target to become available

§  when URS sends request to external server and waits for response

§  call "delay" function in strategy

§  When the strategy is suspended, URS can execute other waiting transactions.

Upper limit of 10,000. When synchronous counter reaches 10,000, the interaction is interrupted and the call is default routed. In the logs you will see:

URS prior to 7.6.100.xx:

WARNING: Attention! It looks like some branch of strategy
        <*0x65*MY_STRATEGY> has tendency to cycling.
        Call following this strategy takes a lot of CPU time
        and prevents another calls to be handled.
        Please check and modify strategy <*0x65*MY_STRATEGY>.

WARNING: Attention! Call <006601c0e4245003> will be terminated.

So if you see the "WARNING: Attention!" in the log and the call got terminated, then you have to review your routing strategy logic, it definitely has a flaw. If you just got "WARNING: Attention!" and the call continued being handled, then you might want to review your strategy for potential optimization, note that it might be just a big strategy and/or the call is being handled for a long time and there is no any problem in the strategy.

Concerning your issue, there is no way to configure number of loopings; however you can try cutting your string if it is a little over 2500 characters long. To do so, you can use String manipulation functions, right after the place where you collect your string in strategy. Please refer to the Universal Routing reference manual, String Manipulation Functions. There are several ways, replace the end of string or use its beginning.