Multiple Robots with single report/log file

I’m running multiple robots through Orchestrator.

My process builds an excel report of transactions processed which is sent to the client by email at the end of the process.

If I run the process on multiple robots, then multiple reports are produced and emailed to the client. One for each robot.

Ideally, for each job, I want a single merged report to be emailed to the client when the job finishes on the last robot to finish.

I could have the robots all writing to the same excel report file, but find that this can cause a conflict if multiple robots are trying to write at the same time. I also only want the last robot to finish to email the report to the client, or they would get three copies of the same report.

Any suggestions? Thanks.

@andrewjames,

what is your transaction item, based on that you can check whether that is the last transaction or not. If it is the last transaction then you can consolidate all the three files together and send a single report to the customer.

Thank you for your reply.
The transaction item is an orchestrator queue item. I’m not sure how to determine that it was the last queue item.

@andrewjames,

Refer this link, we can get Processing/New items in the queue, if no items in New/Processing status then all the transaction are completed. If we get count as 1, then thats the last transaction.

1 Like

The issue with this may be that the process has been sent a stop signal from orchestrator when there are still a number of new items left in the queue. In this case, all the robots will see there are still items in the queue, so none of them will produce/send a report despite the job ending.

@andrewjames,

We can use orchestrator api calls to identify the queue items count, with that we can generate teh report

You’ve lost me here. The number of items in the queue won’t tell me if the job has finished?

@andrewjames,

If we able to get the last item we can make a flag and at end of the transaction we can trigger the report consolidation.

I’m still non-the-wiser. How do we know it is the last item that the job is processing?

The solution I have gone for us as follows:

  1. Each robot has it’s own report file in a folder called “Spool”
  2. When the robot gets to the “End Process” stage of the ReFramework it checks to see if there are any other queue items “In Progress”
    a. If there are items in progress it does nothing further
    b. If there are no items in progress it loops through each file in the “Spool” folder, and appends the contents to a master report file. This report file is then sent to the user.
    c. The robot deletes all the files from the “Spool” folder.
2 Likes