Here, we are going to see how we can build a simple Hello World program in an RPA automation tool called UIPath. There are many RPA tools available in the market but we choose UIPath due to its free of cost accessibility.
For detailed information about RPA and UIPath installation, use the following link of our fellow author's blog where he did a lot of hard work to explain the concept clearly and very fluently.
Now, let us move forward for a simple hello program.
Step 1
Create a new project and create a sequence from the "Activity" tab by dragging it to the main tab.
Step 2
Now, drag a dialog activity into the sequence activity.
Step 3
Type a welcome message into the message box either by typing through a keyboard or by setting the text of message box into the Properties tab on the right side of the screen.
Step 4
Now, hit "Run" on the standard menu tab.
Output
So, here is our first simple tutorial. It was very short but we are coming with more broader and interesting logical problems which can be solved using UIPath.
Now, let's see how we can use variables in an automation activity inside the UIPath. If you have formal knowledge of variables in any kind of programming language, it will be easy to understand this, although I will explain it more deeply.
Variable is a special user-defined name which can accept different values depending on that variable type. Its value can be static or dynamic as per the logical state working on it.
New Variable
It is important to have an activity in the main designer panel to create a variable. Right-click on the Activity Properties tab and click on "Create Variable" or press ctrl+k.
After pressing ctrl+k, a floating popup will appear, having a label "set Name:". Here, enter a unique name and click on the "Variables" tab at the bottom side.
There are four kinds of editable settings.
- Name: Name of the message.
- Type: It defines the type of the value this variable can hold. We will discuss it later in detail.
- Scope: It defines the activity on which a variable can be accessed. It can be accessed on activity and all its sub-activities.
- Default: It sets the default value of a variable if no value is given to the variable.
Variable Type
There are 5 default variables present in the "Variable Type" dropdown.
- Boolean
- Int 32
- String
- Object
- Array of [T]
There is a browse option by which you can browse for other .NET types. Here, you can find many .NET types and use them. For example - ListItem.
If there is anything wrong with the variable creation, then an alert sign will appear on the top right side of the Activity header.
Now, we will practice with two simple examples using variables.
Example - Welcome Message using variables.
First, create a sequence using the Activity tab. And then, drag a dialog bot activity into it.
Click on the message box's Property tab and right-click. Then, press "Create Variable".
Type the variable name and set the type to String and also set the default value.
Now, click the run icon.
And here comes the same result using a variable.
The next article will tell us "How to use variables and Arguments in UIPath". Also, let me know if there is anything I can do to improve my articles.
Thanks and Happy Coding!!!