cancel
Showing results for 
Search instead for 
Did you mean: 

Send Consolidated Email

polugopi
Level 2
Hi Everyone, i have a task as follows : Bot Will check items are pending on work queue or not . if  yes Bot will perform all the steps and generate one excel report contains how many files are uploaded successfully and how many are failed, and finally bot will send an email containing this report as an attachment.   Now what i need to do is , i need to run the above process on multiple machines at same time , i need to send only one email instead of multiple mails.   can anyone provide solution for this ?  
4 REPLIES 4

david.l.morris
Level 15
Take a look at the Work Queues guide at the section on Parent/Child Queues. To be honest, parent/child queues is kind of painful to deal with, but it's worth it if you truly need multiple resources to work on a queue at once and only have one of them send an email at the end. The other way to do it is to have the process check the queue for locked/pending items as it loops around in the main loop and when it finds there are none left, it creates an environment lock to send the email. All other currently running sessions of the same process would check for the environment lock and see that there is already a resource sending the report and the resources without the environment lock could shutdown their sessions.

Dave Morris, 3Ci at Southern Company

polugopi
Level 2
Actually i am new to multi bot scenario. as per your solution, i need to apply environment locking mechanism.So can you please explain more elaborately on which step i need to apply lock.(like after get next item decision stage ?). if possible can you draw flow diagram that will be more helpful tome.     Thanks, P.Gopi

david.l.morris
Level 15
It depends greatly on your flow. Consider what part of the flow should only happen on one machine at a time. Based on what you describe, I'm guessing that you'd want to use an environment lock after 'Get Next Item' > 'Got Item?' > 'No' path and just before End. Remember that it's not enough to check for Pending items only. You should also verify there are no locked items before generating the report. This is the reason that parent/child queues are normally used for this requirement. The Parent item is the one that drives the report as its overall status is only updated after all the child items have been completed. You'll also need to decide what to do if there are exception items. Should the one bot still generate a report if there are some exception items that have not been retried/completed or should it go into a loop where it waits for you to force retry items that could not be handled by the bot on its own? I'd be interested in what other people's solutions are to this. In my working with parent/child queues, I've found it to be a bit of a headache because you have to account for so many possibilities. For now, just try doing this on your Main Page... Start Start Up (subpage) Get Next Item Got Item? Yes: Main Loop No: Generate Report (subpage) On the generate report subpage, have some logic that uses the Work Queues action 'Get Report Data' to get worked items, pending items, locked items, etc. as a verification that work is done. 

Dave Morris, 3Ci at Southern Company

polugopi
Level 2
can u please share flow with multi bot scenario? because i am not understanding how to  implement