"Pause" BPL business process on error
I have a business process.
if it has an error it dies, or if a have a catch all/fault handler the execution flow goes there.
However, I want another behavior.
If any error occurs I want the process to "Pause" (and alert me), so I can figure out what went wrong and resume from the last request.
Here's an example of how it could work:
- If an error is caught, call BO
- BO defers response
- BO sends alert
- Fix BP
- Manually resolve deferred response
I'm not set on the exact pause/resume mechanic but I hope it makes the general idea of what I want clear enough. Ideas?
Could you generate a message to your ens.alert (or equivalent) from the BO, and then immediately call ##class(Ens.Director).EnableConfigItem to disable the business process?
Yes, that would work for notification.
The main issue is resuming from where things went wrong.
My goal is not to reexecute the process, but rather resume from the point I got an error (or immediately before, i.e. on a last successfull request/response).
What about setting "Reply Code Actions" to "E=D" and enabling "Alert on Error"?
From the reply code actions help text:
"D - Disable the Process, log an error and restore the original incoming message to the front of the Process's queue."