Eduard Lebedyuk · Feb 18, 2019

"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:

  1. If an error is caught, call BO
  2. BO defers response
  3. BO sends alert
  4. Fix BP
  5. 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?

0 229
Discussion (4)1
Log in or sign up to continue

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."