I'm writing a process where I'd like to record the error type (Document or Process) along with some other information that I've set as process properties. I tried doing this using nested try/catches as below:
however, if a system error happens, the process properties I set in 'Main Set Properties' don't get persisted down the outer 'All Errors' catch (whereas if there is an inner 'Document' catch the property values are still there)
I've tried various options but haven't had much luck - if I set the properties before the try/catches that all works fine, but there are some properties I really need to set after both try/catches - but still be able to access them down either catch path.
So I was wondering if anyone knows how to access the errorType details using groovy? I was thinking I could then have a single try/catch for all errors, and a data processing step with a script that gets the errorType. That way I can get the other properties I've set as part of the process, as its only a single try/catch, but still be able to identify whether it was a document error or a process error.