22. How to Open and Close Applications efficiently in UiPath Modern Design using UiPath Re Framework

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
uipath has got two design experiences one is the classic and the other is the modern design experience as an RPA developer we should know both the experiences how to use what in this playlist We are covering the classic versus the modern design in a step-by-step manner where we are focusing more on the modern design in the previous videos of the playlist we have covered already all of these topics in case you are absolutely new to Modern design and you want to get started you can refer to the playlist and get [Music] started today in this video we are going to see that in case I am working in an Enterprise level project and I have to use the uipath modern design experiences how do we work efficiently with the open and the close applications right just to give you the background in the modern design activities we have seen that whenever I have to use any application I have a single activity which is called use application SL browser which is used to handle both the application as well as browser so if you are a developer who is coming from a classic experience you would have seen that you used to have two activities one was the open application and one was the attach application however in the modern design experiences you only have one activity both to do the open as well as the attach right so people who are experienced developer you would understand that in the init all settings right if I go to my project this is so a classic developer used to use both the activities and then used to write the automation efficiently however when I started doing this modern playlist now I am getting that questions regularly that how do I handle this open and close with a single activity and that is what we are going to address in this video okay so let's try to define the use case okay so I have my robotics Enterprise framework in front of me for the people who have no understanding of Robotics Enterprise framework I have a dedicated video where I have explained all the robotics Enterprise framework in a stepbystep manner both with the cues and without the cues and also we have created a end to endend use case right so please refer those videos in case you are absolutely new to uipath robotics Enterprise framework okay so this is our robotics Enterprise framework so what typically we have to do is we go to initialization and we open the application in here which is the this block let me just come down in it all application here we have to open the application and then into my get transaction I get the data from the queue and then we process them one by one right so that is how the robotics Enterprise framework work okay so today let's say I have an application which I have to automate which is a Wii application this is just a plain exe which I have taken okay and this we have to automate and we have to put some data into this now since this is a robotics Enterprise framework what I have done is in advance I have created a queue and the name of the queue is dou uiq and you can see that I have got nine items in them right so let's say my dispatcher has already completed and you have the nine items which are available in the queue right now as a developer you have to write an automation to feed this data into this application in a step-by-step Manner and you have to make sure that this application opens and close and we are going to use the modern design okay so first thing first right this is my application so I'll go to the initialization right and here we would have all the configs and everything not going into the nities of the robotics Enterprise framework right that's not the agenda so the first thing is in the initialization I will straight away go to this one which is called the initialize all application I'll go here and I say open the workflow right you can think it of your own application and here we have to write the code to open the applications right so I'll go to the activities and if I just say open application right since we are in the modern design so you are going to directly get this activity which is the use application SL browser drag and drop it here and that should have this wizard for you right so I want to I want to open this application so I'll go here and I say indicate and I'll just point it to this application okay now I'll just close this close this go here and I say run the file okay and we can see that the application was open and at the same time the application was also closed right and that is a problem right if I go here and I say run the file again right see what happens so the application get opens and it is closed automatically right however if I'm doing a realtime Automation in the init all application I would like the applications to be open so that my process. zaml could utilize the same application right but why this is happening and how can we prevent that that is the first thing right so if you see here we are trying to open this application if you go to the properties right these are all the settings which we have already defined in here you have something which is called options and in the options you have two things which is the close and which is the open so these are the two properties guys which you have to use intelligently to make sure that your automation can handle all these scenario right so if you see here in the close right if I keep my mouse you would see that define whether to close the target application after it is executed or not so if I go here you would have three options never if opened by the browser and always so as of now it is always closing the browser as soon as the activities are done there are no activities so it is getting closed however in the in all application what I would like to do as a developer is that I would like to hold this application so what I'll do is I'll say close and I'll say never right let me save this go here and I say run the file right I'm just running in it all applications right so now what should happen the application will now open and uip paath will not autom automatically close this application so this was the first issue which you have asked me that hey I have opened the applications and now as soon as I come out of the scope it is getting closed right because of this setting right now this completes the initialization right so we have initialized it now what a developer will do then he will go to the get transaction data here we are going to read the data from the que one by one and we are going to get the transaction data so I'll open the get transaction data okay no changes here we just have to specify the Q name right so it's already Q folder and Q name let me go to the project in the data and I'll open the config do xlsx okay again repeating guys we have already covered all of this in the re framework so I'm not spending much time on the q's and all right so in the Q name and the Q folder will just specify where our data is so my data is in this folder which is the unattended folder and my Q name is WQ right so I'll just mention that in the Q folder I'll say unattended folder and let me quickly check the Q name as well the Q name is wiq okay let me check for the Extra Spaces okay save and and close okay so now what would happen in the get transaction data all these data would be read one by one and in the process transaction we have to process all these data one by one right so I'll open here the process transaction here it says process the items I'll say open the workflow okay and here we have to start the process but before starting the process we would have to get the data from the queue so I'll go here here and I'll take a multi- assign activity okay let me quickly check what data I have in the queue view the details and I have the uh cash in and the honest check right so I'll just copy these values I'll create two variables here okay and now all we have to do is is read the data from the queue how do we read the data from the queue we just write here in transaction item dot specific content cach in do two string and that will give me the value for the caching and similarly for the honor check I'll copy this go back in transaction item do specific content right that's the syntax guys and provide the onest check dot two string and save right so now for each and every transaction we will get all this value here right now what we have to do in the application we have to feed the values into this and let's say we click on this button accept right so I'll go to the activities and now again since we have to feed it we are going to use the same activity we use application SL browser and now I just go here and I want to point it to this one okay if I save this and let's go here and try to write the data right so first we want to do a type into so I go here and I use an activity called type into drag and drop it here indicate on the application type it on the cach in field right not doing the complete automation because our agend is to just see the opening and the closing right so what do you want to type so I want to type here cash in that's it the same thing I'll just quickly do for the second input box as well WI honor check you have a modern design working perfectly and honor check and then what we want to do is we simply want to let's say click on the button so I'll go here and I take a click activity and that completes the automation right just three activities take a click activity and let me just try to click it on the accept button like this okay okay and that completes my transactions right again the rest steps you guys can write it along by yourself right now if I just try to run this as it is okay let me go here and I put a break point on multiple assign maybe right and let's try to understand it from the beginning okay so as of now this application is open let me just close this okay save this and I say debug the file okay let's see what happens so in the init all applications we have told uip path to go and open the application and keep it open Okay so let's see what happens process started okay and it has opened the application we can see the application I say step into and then here it has to type right so you see here now it is going to type the same into this application type into the first value right step into the second value click accept and the new transaction number generated and now if I say continue that trans transaction would be marked as successful right and now what would happen this will come again for the next run so I say continue and you would notice that now it is coming for the next run so here if you see my use application SL browser is not opening the second instance of the Wii right because it was already open this use application SL browser is using the same instance of this application and trying to utilize it for all the transactions right now sometimes what might happen is that you are writing an Automation and it is reopening one more instance right let's say for this one it does not open right it is trying to use that but let's say you are opening some writing some automation where it is opening an instance so here what you can do is you can simply go to the properties and in the open you can say never where I am Telling You IA that don't open this application from this activity one more better option is if not open and it's on the safer side right check if that application is not open then only go and open that application right if it is already open use the same if it is not already open then go and utilize it okay now one more thing here after this processing is done right there are some application which you would like to close as soon as the transaction is done you would like to close that application let's say for some session management or anything right so what you can do is you can go to the properties here and in the close you can just say always now what would happen let's see I'll save this and I'll just again run it in the debug mode okay and as of now I'm manually closing this we'll talk about this in a bit moment so fresh automation now again running it will fetch the next transaction okay in all application we'll open the application okay it has opened the application we are in the process zaml now step into and here we have mentioned if it is already open use the same instance right so it is trying to use the same instance step into step into and we have mentioned that once you are done with the operation close the application step into okay done with this done with the use application and at the bottom you would see that the application is not available step into done and now if I click on continue what would happen it will go and it will get me the next transaction right now the application is not open step into and now here if you see in the properties we have mentioned that open only if it is not open right so now the application is not open step into it open the Wii application and it inserts the second value I say step into it inserts the second value I say step into it accepts it and then as we have instructed it should go and close it right so you see here as soon as the transaction is completed if you want to retain it you can simply go and say do not close if you want to close it you just say close right so that is how you can use these two properties and make open and close right one more thing which is a best practice and you guys must must be knowing that in the initialization right you have something which is called kill all process which we have already discussed in details in all the re framework videos that here we usually write the code to kill the application in the first instance so that whenever the automation is starting it gets a fresh environment or I would say the application has no issues right so here you are not supposed to use the use application SL browser in this one you have to use this one which is called the kill process and you simply kill the process so in our case it is dou UI right so in the kill all process in the kill all process you are going to use this activity which is kill process activity okay now the same concept is applicable if I just go to the end process here in the end process we have this one which is called the close all applications. zaml right so in the close all application how do I close the application right so there are multiple ways to close an application and let's say let me just open this application first okay so let's say once the transaction is successfully completed as we have seen in the process. zaml the uipath modern design has an activity which is called the close and done right it was automatically closed let's say there are some application where you want to close explicitly by using the close all application right so here you can write a code to close this application now the code can be as simple as that where you say that use application SL browser okay and attach it to the Wi instance and here because this is the CL close all process in the open it it should be never right I never want to open any application here and in the close mode I would always like to say that if it is open by the app browser right then only you close it right if it has open you can close it right that is also an option cut and in the close I can say always right that means that if this guy has opened it it will close automatically but let's say this guy has not opened it then there is no sense of closing I can simply use uh click Activity drag and drop it here so this is in the close all applications guys right just a fallback mechanism to make sure that the application get closed so here I just point and I say confirm right but the important thing here is that in the open property you have to say that I have I am never going to open it here right because you never want to open an application just to close it right and in the close I would say always close it in case by default it's open right but your actual close logic will apply here only so I hope that makes sense right just a quick recap guys you have a single AC it use application / browser which is available in the uipath modern design to take care of both the attach as well as the open so in the initialization whenever you are trying to open an application it can be anything in our case it was a DUI application in the open property I have left it to blank right where I'm saying uipath that okay open the application by default wherever in the close I say never because this is the initialization if I close this application here it won't be available for the other states of the automation right but in the process. ZL when I have to actually process the application here I have changed the properties to different where I say that open if it is not open let's say by something happened to the application in the init it was not able to open some exception some Network related issues then only open it and in the close if your application want you want it to close every time you can close it otherwise you can tweak it as per your requirement right but the idea here is you can change the settings next we have seen that in the Kil all process we are not going to use because it is cleaning of the environment so it does not make sense to use the use application / browser here we have to use the kill process and similarly when you are using this Automation in a close when you have to close the application gracefully you'll just try to attach that application right and open is never because I don't want to open it here close I'll say always and then inside I will write the code to close the applications right so this is how you use the use application / browser intelligently in the uipath modern design so that all the transactions are processed 1 by one okay so now if I go to the main and if I just go here and I say run right so now what should happen it will it should go and process all the items one by one right so let's see here okay so the application has open right it is now processing the items one by one transactions completed reopening that because that's what we have told in the process. ZL to close it it right in case you want to retain the session you can simply set that to as your requirement and it will continue for all the other transaction without getting into the difficulty of opening and closing it separately right so I have put I think close to 10 transactions once the automation is successfully completed it will simply go and close all the applications okay so I can go here and I can say stop okay that is it I wanted to cover in this video and I hope you guys have now a clear understanding if you have any more questions any more doubts feel free to write me in the comments or you can also drop me an email as well right if this was helpful please do subscribe to the channel and see you in the next video where we are going to discuss more details about the modern design experience thank you for watching and happy automation okay so that is all for this video I would like to wrap this video here I hope this was insightful if you have any more questions any more doubts feel free to write me in the comments or you can also drop me an email as well I would appreciate your feedback on the video and tell me in the comments what would be the next topic or next video you want to see so with that I would WP this video here thank you for watching if you like this video please do subscribe to the channel and happy automation [Music]
Info
Channel: Tutorials by Mukesh Kala
Views: 613
Rating: undefined out of 5
Keywords: UiPath, UiPathCommunity, RPA, LearnRPA, Tutorials By Mukesh Kala, automation, tutorials, how to, uipath tutorials, uipath beginner, robotic process automation, UiPathRPA, uipath rpa, UiPath Videos, Rpa tutorial, Robotic Process Automation, uipath training, UiPath examples, RPA Training, UiPath Mukesh Kala, uipath descriptors, descriptors in uipath, uipath modern design, uipath modern design experience, modern and classic design in uipath, uipath modern design experience vs classic
Id: nZOcCGjfaDE
Channel Id: undefined
Length: 26min 32sec (1592 seconds)
Published: Mon Mar 11 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.