Get notifications if a BP process fails to start

sck360

New Member
Hey,

When a blue prism process fails to start from the scheduler, it can become very frustrating especially when there are many processes to monitor. e.g
Task: xxxx Process threw an exception: Resource xxxx is offline - retried 10 times
or
Task: xxxx - Session creation failed on resource 'xxxx': xxxx' is too busy to run that process.

The process fails to start, so there's nothing that can be done in the process itself to alert us. I'm curious to know if anything can to be done to alert us when this happens? This would also be great to let the business owner know that the process failed to start also.

Thanks
 

VJR

Well-Known Member
Hi sck360,

If there is nothing that can be done in the process then you can think of something outside the process to determine whether the process started or not.

You can a look at Post #5 here to get what the idea is but will be slightly different in your case.

Basically it is about have a logging mechanism as the first step of your process which would write to it as below, say if you have a 10 AM process

17/11/18 10:00:00 - 10 AM Process Started...

The script file will kick start from the Windows scheduler at say 10:05 AM. If it finds a recently created/modified log file or maybe with a specific name in the designated folder then it will read the log message and if it does not find a "10 AM Process Started" message (or if it did not find the file itself in the first place) then it could mean that it wasn't started (or you can run it a little later at 10:10 AM). You can even send an email from the script file itself to the business owner and the support staff saying that the 10 AM process failed to start.

Once the email alert is sent out this file can be automatically moved to another folder so that it does not conflict with the next run.
You can have one log file per process per run and can also have an automated clean up mechanism to purge unwanted old files from the folders.

A suitable design should be thought of between the Windows Scheduler and the log file name/timing so that there are no issues when the process is rerun again after a failed run and the script is yet able to identify the second failed run too.
 

sck360

New Member
Hi VJR,

Yes, this is exactly what i was looking for. I've now implemented this and will test it over the next few days.

Once my process is kicked off, it will write today's date to a txt file. Ive then created a power shell script that will compare today's date with the date saved in the txt file. This is scheduled with Task Scheduler to on weekdays.

Appreciate the help on this.
 
  • Like
Reactions: VJR

HakanEngman

New Member
Hi, As you are mentioning Powershell, I's fairly easy to query the BP backend db and get starttime of schemas and processes. But you need access (read) in the DB for this to happen. We currently catch missed schemas and hung processes this way.(and create tickets for the issues.)
 
Top