2. 2
• A workflow represents a small piece of automation that you can take and re-
use in your projects. It is basically your canvas, the place where you design
and work with all the UiPath Studio activities and it defines the flow of your
automation. Hence the name, workflow.
Types of Workflows:
• Sequences
• Flowcharts
• State Machines
• Global Exception Handler
Workflows
3. 3
• Variables are containers that can hold multiple data entries
(values) of the same data type.
For example, EmailAddress can be a variable that holds the
values like rpadeveloper@uipath.com, rpasupport@uipath.com
etc one at a time of execution.
• Variables help us pass data from one activity to another.
Advancing with any programming would be hardly possible
without using variables.
Variables
4. 4
• Name - The variable's name is its unique ID and it defines the
way it is displayed and used
• Type - It defines what kind of data can be stored in the
variable, type must be declared when it has been created.
• Default Value – Initial value of the variable, if none of the Other
value has been assigned it will consider default value for the
execution.
• Scope – Global and Local are the two scope which defines the
visibility of the variable in workflow. the scope of a variable
cannot exceed the workflow in which it was defined
Properties of Variable
5. 5
• From Variable Panel
• From Expression
• From the properties Panel
Sample Demo
More Details :
https://docs.uipath.com/studio/v2020.10/docs/
managing-variables
Creating of Variables
6. 6
• Arguments are very similar to variables:
• They store data dynamically
• They have the same data types
• They support the same methods and properties
• The difference is that they pass data between workflows, and they
have an additional property for this – the direction.
• Arguments have specific directions: In, Out, and In/Out. These tell
the Robot where the information stored in them is supposed to go
Arguments
7. 7
Creating of Arguments
• From Argument Panel
• From Expression
• From the properties Panel
Sample Demo
More Details:
https://docs.uipath.com/studio/docs/managing-
arguments
8. 8
• Control flow - is the order in which activities are executed or evaluated in a
software project.
• Control flow is enacted with two concepts such as Sequence and flowchart.
• Control flow statements -
The activities and methods used to define the decisions to be made during the
execution of a workflow.
The most common control flow statements are If, While, Do While, For
Each, Switch, and Parallel. We will focus on them one by one.
Control flow and its statements
9. 9
the If statement is comprised from the elements you would expect it to be:
• The Condition that is verified (with 2 potential outcomes – true or false).
• The Then branch - the set of actions to be executed when the condition is true.
• The Else branch - the set of actions to be executed when the condition is false.
What is different is that, based on the chosen type of layout, there are 2
corresponding activities that fulfill the If statement role:
• The If activity in sequences.
• The Flow Decision activity in flowcharts.
More details : https://docs.uipath.com/activities/docs/if
IF
10. 10
• Loops are repetitions of a set of operations based on a given condition. In UiPath, the most
important.
• loops are: Do While, While and For Each.
• Do while : It executes a specific sequence while a condition is met. The condition is
evaluated after each execution of the statements.
• While : It executes a specific sequence while a condition is met. The condition is evaluated
before each execution of the statements.
The key difference between Do While and While is that for Do While, the activities contained
within it are executed at least once.
• For each : It performs an activity or a series of activities on each element of an input
collection.
This is very useful in data processing. Consider an Array of integers. For Each would enable the
robot to check whether each numeric item fulfills a certain condition.
Loops
11. 11
• Loops are repetitions of a set of operations based on a given condition. In UiPath, the most
important.
• loops are: Do While, While and For Each.
• Do while : It executes a specific sequence while a condition is met. The condition is
evaluated after each execution of the statements.
• While : It executes a specific sequence while a condition is met. The condition is evaluated
before each execution of the statements.
The key difference between Do While and While is that for Do While, the activities contained
within it are executed at least once.
• For each : It performs an activity or a series of activities on each element of an input
collection.
This is very useful in data processing. Consider an Array of integers. For Each would enable the
robot to check whether each numeric item fulfills a certain condition.
Loops
12. 12
• It is a type of control flow statement that executes a set of activities out of
multiple, based on the value of a specific expression.
• In other words, we use it instead of an If statement when we need at least 3
potential courses of action.
• This is done through the condition, which is not Boolean like in the case of If
statement, but multiple.
• More details : //docs.uipath.com/activities/docs/switch
Switch
14. 14
Create two workflows
1. main
2. Age calculator(calculate the age based on DOB)
In main Take name and DOB from the user using Input dialogue box: Create
variable – Name, DOB and age.
In Age calculator create 2 arguments In – DOB, Out – Age.
Come back to Main check if the age is < 18 – display “’Name’+ is a teenager”
if the age is 17<25<60 display “’Name’ + is in adulthood”
age>60 display “’Name’_ is in old age”.
To enhance this you can take teen, adult and old as a string and consider them
as cases in switch and display the message inside your switch case.
Problem statement