cancel
Showing results for 
Search instead for 
Did you mean: 

How to Capture exception and send mail with attached exception image

vinodchinthakin
Level 9
Hi All,

I am able to send an e mail with exception details. But I need to send mail with attached exception image. I am using "save screen capture" in Exception stage.
But where the image will be saved and how to attach in a mail.

Can someone has any idea?

Thanks

------------------------------
Vinod Kumar
------------------------------
6 REPLIES 6

ashish.easow
Staff
Staff
hi Vinod, 

Save screen capture for exception stage is stored in the database and I don't recall a way for it to be accessed programmatically, but only through control room for each RR.
I would try an alternate way of taking screenshots through VBo and then attaching it to the mail which needs to be sent out.

regards

------------------------------
Ashish Easow
Senior Consultant - Professional Services
Blueprism
Asia/Kolkata
------------------------------

Thanks for your response Ashish.
 I don't know that save screen capture is stored in database, because right now i am not using any database. But in the next week we will be  installing SQL DB. I will look into that. 
One more thing is there any VBO or Code that take screenshots.
If we add this action in next blue prism release version , I think it will be helpful.

Thanks

------------------------------
Vinod Kumar
------------------------------

Attached a local version, its not officially supported, just something I have available used by a colleague. There are two set... actions you might want to use before calling Save Screen Shot

------------------------------
Ashish Easow
Senior Consultant - Professional Services
Blueprism
Asia/Kolkata
------------------------------

Hi Ashish,

Thanks for the object

When I tried to run the action save screen shot  its showing an error " Internal : Could not execute code stage because exception thrown by code stage: A generic error occurred in GDI+."

The sequence of actions I followed are
1. set image format
2. set output folder
3. save screen shot

Even I have downloaded respective external references and called in object code options in intialise page.

Am I missing anything?

Thanks

------------------------------
Vinod Kumar
------------------------------

VivekGoel
Level 10
Hi,

Basically, capturing screenshot and sending email gets covered into the exception handling mechanism of your process.
Once you catch and exception, try to take a screenshot and then save it , finally attach the screenshot in the email body and send the email .

You can use the readymade VBO created by me  from here. You will find some interesting ways to capture screenshots here which should cover most of the scenarios. Happy to help.

https://rpatools.com/2019/02/playing-with-screenshots-and-clipboard-images-blue-prism/

Regards
Vivek

------------------------------
Vivek Goel
Submit Your Built solution for "The" RPACULT 2020- The Unique RPA Hackathon of 2020.
http://therpacult.com
------------------------------

My VBO for screenshots - just give it full path of a file to save:
https://raw.githubusercontent.com/aikudinov/BlueprismVBO/master/BPA%20Object%20-%20Screenshot2PNG.xml

Although it silently wont do anything if something goes wrong, like provided path is bad or not writeable, but just remove excepton-pass if you feel like catching exceptions within exceptions... I'd rather not.

------------------------------
Andrey Kudinov
Project Manager
MobileTelesystems PJSC
Europe/Moscow
------------------------------