User Events and Agent-Assisted Automation in UiPath

User Events and Agent-Assisted Automation in UiPath

there are two types of robots the back-office robot can be Optimus meaning it can run independently in the back office while getting an input from a person that robot is user assistant the automation will only run when certain events or easier actions have been triggered this is what we're going to talk about in this video in this video I will introduce you to user events and user assisted automation in you a path this is a very common use case in call centers robots have been assembled to automate elements based on what a call center agents do with our desktop tools imagine when the agent submits a form in its desktop data is scraped by a robot and sent to a web service or inserted in another legacy application automatically so how are these robots are getting triggered in many cases once a robot is activated it stays in the background and listens for a specific user actions like pressing a key combination or mouse clicking on certain images or UA elements when a user performs such actions the robot comes into play and execute the commands it was the sign for in you a path we have three main types of user events we use system events to monitor the entire system for keyboard inputs in mouse clicks element related events we use them in business processes for which we monitor an action on a specific element events on specific images we use them in business process improvement automations where we cannot identify elements in screen like in citrix or remote desktop environment in this case monitoring is restricted to the clicks on the chosen image so let's dive in with quick example of possible user events after watching this video you should know how to work with system key press events since the mouse click events element mouse click events element K press events and image click events let's create a new workflow by going to the Start menu now we have this predefined workflow that is ready for you to use for a specific purpose let's click on agent process improvement let's put in the name of this workflow this will automatically set up this agent and system robot as you can see and some activities has been set up here already this is the structure of the engine assistant in uipath first we have the triggers which are indicated by these three activities a click trigger a key press and pad keys down here is the event handler where the activities are being executed once a certain key has been activated okay let me delete this sequence and we'll do it manually so you'll better understand how to process for us we'll see how the system key press event works let's click on user events then select monitor keyboard let's type in M and take on the Alt key so will you call the robot it will listen to the entire system for the alt M keys combination once a user press out M the trigger will be activated and the robot will go on to perform the event hunter activities to see that the trigger is working let's add a message box in the event hunter this message box will display you have pressed all the M the trigger has been easy unit when alp M has been performed let's click the Run button ok now let's press alt M there as you can see our automation is working correctly now we have to stop the execution manually because the monitor events activity is set to run forever as default this is normal if say you have set up a permanent actionable items when a certain key is triggered on a machine let's go to the execute tab and click stop let's click the monitor event in the properties tab we can set a repeat forever option to false this will only run once after which the robot will exit it's listening mode what if you wanted to stop the robot once it reaches a certain number of repetition here's how we do this let's create a repeat count variable which will increase every time a user press out M the type should be an integer and the scope should cover the entire recording sequence we will increase its value using an assigned activity inside the event handler we can concatenate a number in our message to show that it's working by adding a plus sign and a variable repeat count one last thing in the monitor events we set the repeat count repeat count is less than three condition to the repeat forever argument meaning the trigger will keep on listening it and execute the handles until the hot key has been pressed three times then it will stop the automation okay let's test it I will now press odd M okay that's the first one press it again that's two then third now it ends the automation perfect now we know how to set up trigger using keyboard inputs let's now set up a trigger for a mouse event first let me remove the loop that we have set up then we can put monitor events option to false so we can set it up to repeat once now let's set a mouse trigger activity as you can see I can add another trigger alongside with an existing trigger so that means you can add multiple triggers into one handle so once a user performs any of these triggers the handle will be executed let's leave it as one left that means it's a left mouse click let's remove this text from our message box since we will be using a mouse click okay let's test it I don't click anywhere on the screen and here's our message if you want to trigger to be executed only with a certain application we can use the element trigger okay let's clean this up by removing the previous triggers let me use this sample application to demonstrate how this works the element trigger will work to any applications this is where the agent assisted automation SBU used most often now let's add a click trigger we can then indicate an element on the screen let's select the accept button what it will do is to execute the handle once the accept button is clicked this screen image is recognized by you a path using this predefined selectors this makes it a lot faster for the scraping engine to recognize the element on the screen let's run our workflow our triggers now in monitoring mode let's click the accept button sure enough it executed a command we can develop an agent assisted automation in order to capture the data the users filled in from the application forms or any input fields this is done by adding activities that can get the text from the text fields which are in processing the event handler let's say we want to capture the value filled in by the user in the honest check field of this basic application now let's add this activity get visible text activity let's indicate the check on us field in the application next is we have to set up a variable we can use to pass on values of the text let's pull up the expression editor by clicking this button now we can right click on it and select 4/8 variable let's name it bar check on us okay let's set the message box to preview the value of our variable then since we are setting up this capture activity in the event handler it is important to take note that we need to capture the data from this field before the application processes in action after clicking the accept button if the accept button has been executed first we will be able to capture the text in the check on us field because it will clear up the field for a new entry so what we need to do is to set the event type property of the click trigger to synchronous this way you will get the field value before any actions is performed let's run it and see how it works now the robot is in listening mode let's type some values in these fields let's click the accept button so there's the text captured by our trigger awesome the synchronous event type can also be correlated with block event property this provides you the option to block the execution of an application let's take the block event property of the click trigger now let's go ahead and run the workflow notice the transaction number it's currently at 873 – 6 6 normally the number will increment by one without the block event let's put in some values and click the accept button there as you can see we were able to click the button but the click event wasn't executed thus the number stays the same this is useful if you want to set up a final validation step before any data is submitted and process by the application you can choose to send a click to the application if the user entered validated by adding a reply user event activity inside the event handler so again this block event option can only be used when using synchronous as your event type you can leave the event type to be a synchronous when you want the action of the user to reach the control before the activities in the event handler are executed a typical scenario is when you want a workflow to capture the response of the application regarding the submitted data the event type and block event options are available for all element triggers and image triggers we can also monitor key actions on different controls for this we will delete the click trigger and add key press trigger now we can specify an input field where we want to apply the trigger in this case we'll set up the onus check field for the Hajis let's select control and the letter A so once control a is pressed this will process the event let's run it let's add some data in these input fields if we double click on this field nothing will happen now let's try control a there it is the robot responds to control a key combination then it returns the value in the message box finally let's delete the key press trigger from the current workflow and replace it with a click image trigger now let's dedicate the area where we will perform the click let's test it with enable training tip from our application so we can just drag and drop this rectangle to specify the area the trigger will be executed once a user click within this indicated area let's run it and put some data in our input fields now let's click on enable training tip there is our message box this is how easy it is to set up your robot to respond from clicking an image in a local application same thing can be applied with citrix or virtual desktop environment to recap you can create robots that run three commands at a time during their work these robots access virtual assistants running in the background and waiting for a command from the human user these commands can be in the form of keyboard inputs or mouse clicks we can run within the system or with a certain application once the robot is triggered it can perform a whole series of complicated tasks in this video we've covered how to design robot to monitor and respond to certain user events here are some of the things you've learned from this video system key press and mouse click events element mouse and key press events image click events we also covered setting up a user assisted event triggers in handlers setting up how to stop the triggers from doing actions we've covered synchronous in a synchronous event type how to use block event and reply user event how to capture a user input data that was all for now see you in the next video


3 thoughts on “User Events and Agent-Assisted Automation in UiPath”

Leave a Reply

Your email address will not be published. Required fields are marked *