cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with throttling a process to grab web elements

GracieDevine
Level 4
Hello,

I need some help with designing a process - I'm the lone Blue Prism developer on my team and I'm unable to open a service ticket because I'm not getting an error message for this issue.

I need to grab five particular elements from a webpage. When I run the following page below in Process Studio, all five elements can be found and recorded in Data Items:

36169.png
Each Read property grabs an individual web element; the Wait Stages at the moment are 5 seconds, but I have also experimented with wait times up to 60 seconds.

However, when I run the entire process in Process Studio or the Control Room, it moves too fast and all the Data Items are blank. This does not create an error, the process just continues running.

I tested with a retry loop, with just a couple of the Data Items to see if I could get it to pull at least one web element when the entire process is run:

36170.png
If I run just this page, the Data Items are retrieved, but again, when I run the entire process they aren't. When I run the entire process, the RetryCount and RetryLimit remain unchanged. Here's the code for those below in case I'm missing the obvious:

36171.png
36172.png36173.png
I'm stuck on how to get the retry loop to actually execute - is it an error on my part or do I need to figure out another way to "induce an error"?

Do you have any suggestions for how else I can get the process to slow down?
1 BEST ANSWER

Helpful Answers

Hi Gracie,

Sorry I confused you there with that "Get Inventory File Existence" screenshot, I meant there how to keep the "Do not log parameters' option unchecked.

I will break my insights in two parts. First one, how you can throw this exception is by putting a wait stage and using the UIA element with the action "Check UI Automation Attribute" where you can give the appropriate attribute name which shows the value in your app modeller and check it to be not null as shown below:

36164.png
36165.png

However see if it works, because from the log screenshot I suspect you are getting some whitespace or a hidden character there instead of null that is the reason why your workflow is not even going to retry state. Check how it works, it can confirm my suspicion there.

Next is what ideally we do as a best practice is not include all the read stages in one action itself. I would suggest you to try and have individual action pages with one read stage each and get the value out as an output parameter onto you process studio. Then, after each action call you can use the 'Sleep' action under 'Utility - General' where you can provide a delay of let say 2 sec or 1 sec as shown below:

36166.png
So your workflow should be like:

Action 1 (Read Value 1) -> Sleep -> Action 2 (Read Value 2) -> Sleep and so on...
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

View answer in original post

6 REPLIES 6

Hi Gracie,

I might ask you a couple of pointers to check from your end to understand the issue better.

Firstly, can you enable the logging for all the stages along with parameter logging in the page stage by unchecking the "Dont log parameters on this stage" option which you are using the process studio to call this action. Check if additional spaces are coming or not.

36159.png
36160.png

Also, I would suggest to use a sleep stage instead in you process


Secondly, may I know which spying mode are you using to get these read values altogether. If it were AA mode, there is a wait condition check which you can put called as "Check AA Attribute" which can check some value existence directly in a wait stage and throw a timeout if not found.

36161.png

If you are using any specific spying mode let me know on that too. I will check from my end.
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

GracieDevine
Level 4
Hi Devneet,

I enabled all logging and "Don't log parameters on this stage" is unchecked for every action. I ran the process and see that my empty string check comes back as True, even though the Data Item is empty:
36162.png
I'm a little confused about your "Get Inventory File Existence". I'm pulling the data from a web browser, so for this step should I enter "Chrome" and check for the existence of the web browser? I think I might kinda be doing this already through the "Attach" action, but if you can clarify then I will give it a try.

When you say use a sleep stage, do you mean having a Wait Stage without any kind of check? Like this:
36163.png
To answer your second question, I am spying the elements in UI Automation Navigator. I'm looking at how to do AA mode and will give that a try too.

Thank you!

Hi Gracie,

Sorry I confused you there with that "Get Inventory File Existence" screenshot, I meant there how to keep the "Do not log parameters' option unchecked.

I will break my insights in two parts. First one, how you can throw this exception is by putting a wait stage and using the UIA element with the action "Check UI Automation Attribute" where you can give the appropriate attribute name which shows the value in your app modeller and check it to be not null as shown below:

36164.png
36165.png

However see if it works, because from the log screenshot I suspect you are getting some whitespace or a hidden character there instead of null that is the reason why your workflow is not even going to retry state. Check how it works, it can confirm my suspicion there.

Next is what ideally we do as a best practice is not include all the read stages in one action itself. I would suggest you to try and have individual action pages with one read stage each and get the value out as an output parameter onto you process studio. Then, after each action call you can use the 'Sleep' action under 'Utility - General' where you can provide a delay of let say 2 sec or 1 sec as shown below:

36166.png
So your workflow should be like:

Action 1 (Read Value 1) -> Sleep -> Action 2 (Read Value 2) -> Sleep and so on...
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

GracieDevine
Level 4

Hi Devneet,

I used the method to check UI automation attribute as you suggested, and it threw the exception that the order text could not be retrieved (when the action page is run and when the entire process is run).

I don’t know if it’s helpful information, but some of the web elements I’m scraping are UIA Control Type Text (like Server Name) and others are UIA Control Type Edit (like Port). The element type for all of them is Edit Box(UIA). They all have the Data Type Text. This is how they appear in the browser:

36168.png

 

I remember using a Trim() function in the consolidation exercise for the foundation training, would you recommend I try that here if the problem is whitespace?

 

Thank you for the advice about breaking up the read stages into individual action pages! At the moment, I’m scraping 5 web elements from one link on a table, but once I have this part working, I have 25 more tables to pull this same information from. I wonder if you have a suggestion for how to condense it or if I’m going to have to create 100+ action pages for this process 😊.

Thank you!

Hi Gracie,

Apologies for the late reply as I was having poor access to internet on my end.

"I used the method to check UI automation attribute as you suggested, and it threw the exception that the order text could not be retrieved (when the action page is run and when the entire process is run)."
​ - If you have replaced your elements which you need to read with this action and it is throwing an error then it sounds good as at least now you can throw errors directly in case the element value is null. 

"I remember using a Trim() function in the consolidation exercise for the foundation training, would you recommend I try that here if the problem is whitespace?" - Post this wait stage you can use the 'Reader' stage and then trim the value of your text data item using a Calculation stage to again store the value in the same data item which would be the output of this reader stage. Then check if that trimmed out value is null or not in a decision stage. If the value is null, throw an error and this would add as a double check in case any whitespaces are only coming up.

"Thank you for the advice about breaking up the read stages into individual action pages! At the moment, I’m scraping 5 web elements from one link on a table, but once I have this part working, I have 25 more tables to pull this same information from. I wonder if you have a suggestion for how to condense it or if I’m going to have to create 100+ action pages for this process 😊" - You can create like 25 different actions one for each table and make your element dynamic to pull all the data from the table at once such that whatever value you are interested in taking up you can simply manipulate the values and keep taking up the data. If that approach seems tedious to you, then you can use multiple read stages but just make sure you do all the checks after each read stage as I have indicated above.

------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------

---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

GracieDevine
Level 4
Thank you so much, Devneet. I always appreciate your help.