cancel
Showing results for 
Search instead for 
Did you mean: 

'Blocked' recovery stage not working properly

MariaKihlberg
Level 4
Hi, I am using a block around a particular action in process studio, and have placed a 'recover' stage within that particular block, to pick up any exceptions occuring from that action. When testing it, it appears to be working for some cases but not all. This is not the first time that I see this problem when using blocks & recover stages to capture exceptions. Anyone facing similar issues? Br, Maria
5 REPLIES 5

Denis__Dennehy
Level 15
Hello, I suggest you contact your Blue Prism mentor with this one as it will require looking at what you have built. I have not come accross the issue you mention. One thing I suggest is that you should always be starting your Process development using the Blue Prism basic template available on this Portal. The use of the template is fundamental to ensuring you are using best practice exception handling. The Lifecycle Orientation solution is an example of a process that uses the basic process template.

TomBlackburn1
Level 7
Not sure if it happens in later version of 4.2 of Blue Prism or even a 5.0 derivative, but I did notice specifically on 4.2.47 (I think) when running a process in debug mode, you step over an action that throws an exception, sometimes the flow goes to the recover stage allowing you to carry on stepping over actions, sometimes the exception popup box is thrown forced to the screen. You are able to close the alert box, but then have have to set the recover stage as the next stage. I think there was another workaround regarding stepping out with a breakpoint, but i can't remember. Obviously running from the control room is fine - just in debug mode, when stepping over, or playing. Not sure if this is what you are seeing Maria? - Tom

ArchiveUser
Level 4
I assume what you see is that the first time an exception occurs, it is caught by the recover stage and subsequent exceptions are not caught anymore. The thing is that after catching the exception, you must make robot go through the Resume stage to ""reset"" the error state. I hope this helps.

John__Carter
Staff
Staff
I think Radoslav is correct. When exception handling sometimes does not work as expected, the likely explanation is that there is more than one exception in play. It is very important in BP to make sure there can be only one active exception. One reason for having more than one exception is, as Radoslav points out, not passing through the Resume to neutralise the exception. This means the current exception is still active and the next time an exception occurs you will have two exceptions.Another more subtle reason is forgetting to tick the 'Preserve the type and detail of the current exception' checkbox. If you catch an exception and then throw it again using the Exception stage, you must tick the box. If you don't the Exception stage creates another exception, then you have two exceptions in play and your exception handling may not work correctly.

Anonymous
Not applicable
@tom.blackburn I experience this exact thing, also in 4.2.47, that whenever I'm in debug mode and I get an exception from a stage (only seen it with internal exceptions) I get this forced popup, and the flow to the recover stage is lost, that is, it doesn't jump to the recover stage at all. I hadn't thought of just setting the next stage manually, since I wasn't sure if it would behave like this when not in debug mode, but good to know, thanks. This issue has been bugging me for a while. ~Jesper