Blue Prism Exception Retry- Same exception occurs 3 times the process should terminate


When the same exceptions occur 3 times in a process then the process should terminate, For example, the same System Exception occurs 3 times
please explain some ideas about how to do this logic in Blue prism


Create a data item(counter) (it may vary depends on your exceptions, for ex. 2 exceptions then create 2 counter data items), then each time the exception occurs, in a calc stage check the exception type and then increment the value present in that counter data item which is related to that exception type.

For Instance, If an exception i.e. exception1 occurs twice then ecounter1(counter data item to store the exception occurrence) should be incremented twice, currently the value should be 2 in it.

By using Decision stage, check if it's value is more than 3, then you can stop the process.