another technical blog...technically

Monday, April 22, 2019

Anatomy of a BP consumer template

After a lot of work, Antonio Durante and I decided to create a template to standardize someway how we build consumer processes in Blue Prism.
So let me introduce you DaTemplate.

DaTemplate overview
This is the consumer roundtrip for a typical process that works with queues: i use it everytime.
The concept is, raise exception alwais to the hightest level.

Let's examine the right part first.
After start i reference two pages:
  1. Reset: no matter what happened, close every application that can someway create problems to out process;
  2. Config: configure the environment if needed and get the process global variables
Then i start with the get next, but i put all the data item data in global variables, so they are accessible everywhere. No more global variables except item one and config one, all other variables must be local to the page they are declared in.
In the end i call a page "Item Logic" which is typical of the process.

The right part

So in the process pages, you will use recover resume block to manage exceptions, but, if the result is BusinessException/Managed Exception or Technical Exception, don't do anything and let the left part of the template work for you.
The exception message is extracted and the right action addressed according to exception type.
If Business or Managed Exception, item will be Mark Success (i consider a recognized exception as a success only in the technical log), and logged as an exception in the business log.
If the exception is unknown or a technical one, the process for that item will be repeated for MaxAttemps times before becaming a Managed exception.
Error is screenshotted for further investigations.

The left part for managing exceptions
Please note that on get next and Check Attempts there is a recover resume block.
This is due to the potential failure of the get next, and also a potential failure in the left part of the template that could create an infinite loop.
If we got an unexptected exception, those recover resume blocks will take the template to a new get next operation, just taking 5 seconds to breath (in the case of get next failure).

That's all folks, i hope you find it useful
written in: Milano MI, Italia

0 commenti:

Post a Comment

Because of a lot of SPAM about courses, I need to moderate all comments here.
I ensure you that I will answer whenever possible (if you are not a spammer).

Me, myself and I

My Photo
I'm just another IT guy sharing his knowledge with all of you out there.
Wanna know more?