cancel
Showing results for 
Search instead for 
Did you mean: 

Sending mail with using multiple bot

ChetanNinghot
Level 4
I want to send the message 
I having a process and multiple bot are there ( 10 bot) how to send the mail at the end of the process
( I want to answer for both with environment locking and without environment locking concept )


------------------------------
Chetan Ninghot
------------------------------
2 REPLIES 2

Hi @Chetan Ninghot,

It actually drills down on what kind of an output does your process desires. If let say in your process you have multiple transactions and for each transaction processed among these 10 bots, you want to send an email for each transaction then you simply can include the logic for sending out the email directly within your work step loop and no environment lock concept is required altogether. The only thing here is if let say you have a lot of transactions around 100 or 200, each bot will be sending out individual emails totaling out to be the same as the number of your transaction items which ideally is not a good solution to design as per me.

On the other hand, if you want only one email to be sent out let say as soon as all the transaction has been processed. You can implement this logic outside your working loop as soon as no more items can be found just before the Close Out page.

19245.png

Here, to implement environment lock you can first use an 'Query Lock' action which will return you you the Lock Held flag indicating if any locks have been acquired by any bots before or not. Use a decision stage to determine if the Lock Held flag is True or False, if the flag value is False then it means that the lock was not been acquired yet by any bots and you can simply connect it to the 'Acquire Lock' action which returns you the lock token and lock the environment. Now simply connect it to the email sending section of you workflow. 

If the Lock Held flag value is True it means currently one of the bot is sending out the email so connect the False link to the end stage. Here, my recommendation would also be use a Sleep action for 10 or 20 seconds followed by 'Release Lock' action after sending out the email so that ideally as soon as the first bot among your 10 bots acquires the lock successfully and sends out the email, then it can ideally wait for 20 seconds. Within those 20 seconds, if any of your other 9 bots try to acquire lock, they wont get any lock token since it already is with your first bot and as a result they will skip the entire section of sending out the email. 

19246.png

To know more on how to use Environment Locks effectively, I have another thread where I posted out a detailed sample workflow of reading excel files while using environment lock. Here, instead of the reading portion of the excel file you simply can replace that part with email sending logic followed by Sleep stage as I mentioned above. 

Find the relevant thread for your reference: Environment Locking

------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
WonderBotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

@Devneet mohanty
Thanks for your valuable responce

------------------------------
Chetan Ninghot
------------------------------