the scenario is five bot deployed on a one process with 100 items each bot work 20 items and each bot create a report separately so, how can we create one report for this process?
I hope it is using queues
If so…then you need to follow somethin glike a locking mechanism and let only one bot create the report and this can be implemneted in end process state
Steps are as follows
- Create an asset in orch named lock
- Now in you init state first run if condition set the asset to NA
- In the end process use get queue items woth new or in progress states
- Count the queue items usign quitm.count>0 in if condition
- On else side do nothing and on then side add a get asset on lock
- Using if condition check if strlock.equals(“NA”)
- On else side do nothing and on the then side use set asset with
Environmnet.UserName
and then after that use a get asset again on lock - Use if condition and check strlock.Contains(Environment.Username)
- On else side do nothing and on then side use your create report xaml
Hope this helps
Cheers
Cheerd
2 Likes
this seems useful, I have been asked this question a couple of times and it was always confusing as to which strategy is to be used. However I would like to understand why using a datatable and appending the result to it is not the correct way?