I have a system in which callers sometimes wait for their assigned agent for quite a long time. Long enough for the script to exceed 1000 steps. This happens about once a month, which isn't a problem because the agents use an application where they can see who called and call them back. The same application displays calls that are in queue. These calls are deleted after hanging up. When calls are abouted due to exceeding 1000 steps, they don't get deleted. Since changing the max. steps excecuted in the system parameters isn't advised, I was hoping to "catch" the exeption with the On Exception Goto step (just to delete these calls in the application). Does anyone know which exception I need?
Most of the information here is irrelevant, the only thing I'm looking for is a On Exception Goto step that chatches WFMaxExecutedStepsExceededException
Doing it that way is technically not possible. If you exceed 1000 steps, then the script is deallocated from memory and the call is dropped (albeit after the default script plays.) Which brings me to the next point: the default script can be customized and it can even receive the reason why the main script failed.
Here are the steps you can use in your customized default script to see if the main script failed for the max executed exception reason.
com.cisco.app.ApplicationException the_exception = null
String the_reason = ""
the_exception = Get Trigger Info (Aborting Reason)
Set the_reason = the_exception.getMessage()
If ("No. of executed steps: 1000".equals(the_reason))
/* The main script failed due to the max steps being executed */
/* The main script failed for some other reason */
If you haven't used the default script on an application before, you may not know what I'm talking about. See this screenshot for an example:
EDIT: I don't know if the reason is a String literal, or if it is derived from the value set on the parameters page. Maybe someone with a higher value than 1,000 on their system can try this out for us and let us know what the reason is for them. If it is different depending on your setting, and you want a solution to work with any value for max steps, then change the if step to this:
If (the_reason != null && the_reason.startsWith("No. of executed steps"))
Please use the star ratings to help drive great content to the top of searches.
My answer might come too late, but you just have to use a standard "Set" step.
The the_exception.getMessage() code is in fact pure java code that is directly inserted in the value field of the step:
Hope that helps,