cancel
Showing results for 
Search instead for 
Did you mean: 

Bot will only process first requisition - problem with loop?

GracieDevine
Level 4
Hello all,

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?
4 REPLIES 4

John__Carter
Staff
Staff
Hi Gracie - not sure where to start here, but will have a go. A few things stand out:

  • 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.
The development in the screenshots does not look to be of good quality, it's poorly laid out and contains examples of bad practice. But that said, it appears that the idea is to iterate through a collection and use a 'row counter' value to make decisions.  I would find the other half of the 'Loop Over Req Numbers' loop stage, to see which steps are within the loop and how the decision stages use the counter value to send the flow left or right.

One technique you might consider for steering the logic flow according the environment is to use the GetConnection() function
36568.png

GracieDevine
Level 4

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!

John__Carter
Staff
Staff
Hi Gracie - hmm I feel your pain, sounds like an awkward situation. Ideally your line manager should try to find RPA advice from BP and/or a BP partner, and perhaps start by asking whoever sold you the BP licenses. In simple terms, setting up a solid and scalable RPA shop is not just about learning the tool, there is a whole range of topics to address.

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.
36570.png

GracieDevine
Level 4
This is helpful, thank you John!