Bot will only process first requisition - problem with loop?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-04-22 08:58 PM
This is a weird one.
I'm working with a bot that was developed in Test and pushed to Prod- my task is to get the bot working in Dev. All three environments have different screen resolutions, but workarounds are in place. They all use the same OS version and Blue Prism 6.5.1.
My problem is that when the bot receives an order, it will do one of two things: it will either process the first line of the order successfully and then log out of Oracle without processing any others OR it will terminate without processing anything.
The thing is, the Oracle environments are laid out slightly different between Dev, Test, and Prod. I've had to re-spy some elements, etc., but I don't know how to get the bot to loop back and process all requisitions before signing out of Chrome.
I've attached screenshots of what is currently working in Test and Prod - you'll see that in Test there's one Decision Stage not properly connected, but in Prod it's three. Again, despite these errors, the bot runs as it should in both environments.
If I connect First Req? in Dev, the bot will not process anything. If it's disconnected, the bot will only process the first order.
Does anyone have any suggestions how I can get the bot to loop through and process all requisitions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-04-22 12:02 PM
- a bot that was developed in Test - why was this allowed to happen?
- all three environments have different screen resolutions - you should make every effort to align your environments. Wrestling with environmental differences is a thankless task and one that will limit your RPA growth.
- the Oracle environments are laid out slightly different between Dev, Test, and Prod - as above, you should have the same version in all environments, otherwise you have to build, test and maintain workarounds.
One technique you might consider for steering the logic flow according the environment is to use the GetConnection() function
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-04-22 04:44 PM
Hi John – thanks for giving it a go 😄
- a bot that was developed in Test - why was this allowed to happen?
I’m not sure; I’m a technical apprentice (six weeks on the job) and the apprentice I replaced worked alone and without a mentor because no one else at my company is knowledgeable in RPA. My guess would be that he did not know any better and/or was trying to avoid the screen resolution issues and Oracle web app differences.
That being said, I’m being managed by someone different now who is not OK with any of these conditions- I agree that none of this is ideal, but the bot is going to be obsolete soon and going forward I will make sure all these (and other horrors I haven’t mentioned) are taken care of from the start.
One thing I noticed when I looked at the session log is that there is a Count Rows action (occurring before the loop) that returns a value of 1… could this be the cause of the problem? I attached a screenshot.
I appreciate your help and thank you for telling me about the GetConnection() function!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-04-22 11:52 AM
But to your specific problem: the loop stage is the mechanism to iterate through a collection, and typically developers keep track of which row is current by incrementing a count or index value. Below you can see how the Row Counter data item is increased by 1 on each iteration of the loop. Then the process checks the value of the counter to decide whether it is working on the first row of the collection or not. So in the example below, the flow will go down the Yes path once and the No path 8 times. But if the collection had only 1 row, then the logic would go down the Yes path only. If the collection had zero rows, then the logic would straight from Loo Start1 to Loop End1, missing out the 'innards' of the loop completely. And if the flow somehow executed the whole loop again, then you'd need to be sure that Row Counter was set back to zero and not left with the previous value (which in the example below would be 9). I hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-04-22 04:34 PM
