Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Avoiding the WFMaxExecutedStepsExceededException

I've already searched a bunch through these forums in an attempt to find a way to avoid hitting a WFMaxExecutedStepsExceededException.  In my particular use case, I have a list of 100+ items that I get from an xml file.  The script generates and plays an audio file for a particular item and then asks the caller to confirm, advance to the next, or skip ahead to the next major item in the list.  If the caller skips ahead enough times, the script will eventually hit the 1,000 steps before even getting to the end of the list.  Is there a way to reset the current steps or recursively spawn the same script to restart at 0 steps or something else to get around this error?


Hi,with all due respect, I


with all due respect, I need to ask: did you consider optimizing your script?

Would it be possible to attach a screenshot of your script? We can take a look at it together here.



New Member

I am a fan of refactoring

I am a fan of refactoring code.  Here is the problem area:

As you can see, the max steps will be hit quickly if the caller keeps pressing the digit for next stop or next major stop.  I'd rather catch the WFMaxExecutedStepsExceededException or reset the steps instead of having the phone system hang up on the caller.

Hi,I tried sort of browse


I tried sort of browse through all the methods and fields of all objects available within a UCCX script (derived from the Call object) but I gave up. I guess it's safe to say there's no way to reset the counter "in transit". To be honest, if I were the Architect of UCCX, I would not let this option be available, either.

Anyway, what I would try to do is insert a counter that would increase if the caller presses the digit for next (major) stop, and if this counter reaches a certain threshold, I would just play a message ("hey, stop doing that"), or as Anthony said, exit the currently running script, and re-enter it via an application trigger or a redirect. This might mean some tradeoffs with the sanity of reporting, but I noticed you already have implemented custom logging so adding a few steps (wink) for pushing some reporting info to an external DB should not mean a problem, either.


P.S.: Also, you can consider moving a part of your application to an external one, via Javascript (but this kills CPU and RAM) or HTTP (but this might be slow) or VXML (this is great but a pain to administer).

The quick short answer is,

The quick short answer is, increase your max step count.  A lot of people do it.  So much so, I think the warning needs to go away.

The next short answer is, Trigger Application or Call Redirect will reset counters.  With the Trigger Application step you could achieve something great for your application.  If you've never used it or heard of it, then you're in for a real treat.

The longer answer is of course to optimize your code. But in all reality, if you are providing a service in which a caller can spend all day going forward and backward like this, then no matter how much you optimize, the ceiling has the potential to be hit.  Whether it's max execution, memory leakage, or the 12 hour phone call limit imposed by CUCM.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.