Lesson Overview
This lesson introduces learners to variables and arguments used in Robotic Process Automation (RPA) tools and automation workflows. Learners will explore variable types, variable scope, arguments, argument directions, variables panels, and the differences between variables and arguments within automation environments. The lesson also examines how variables and arguments help workflows store, transfer, and process information during automation execution.
Lesson Outcomes
After completing this lesson, learners will be able to:
- Define variables and explain their role in RPA workflows
- Identify different variable types
- Explain the purpose of the variables panel
- Describe the scope of variables
- Define arguments and explain their purpose
- Explain argument directions
- Differentiate between variables and arguments in automation processes
KT0101: Variables and Variable Types
A variable is a storage location that holds information that may change during the execution of a workflow or automation process.
Variables are important because automation workflows need to store information while tasks are being performed temporarily.
Examples of information stored in variables include:
- Customer names
- Invoice numbers
- Dates
- Email addresses
- Totals and calculations
- Status values
The learner guide explains that variables are characteristics that can assume different values and may be classified as categorical and numeric variables.
Variables allow bots and workflows to process information dynamically instead of using fixed values.
Types of Variables
Variables may be grouped into different types depending on the information they store.
String Variables
String variables store text values.
Examples:
- Customer names
- Email addresses
- Messages
Example:
customer_name = "Sarah"
Integer Variables
Integer variables store whole numbers.
Examples:
- Quantity values
- Number of invoices
- Employee counts
Example:
invoice_total = 25
Boolean Variables
Boolean variables store only two possible values:
- True
- False
Boolean variables are often used in decision-making.
Example:
is_approved = True
Decimal or Double Variables
These variables store numbers containing decimal values.
Example:
price = 1250.75
DateTime Variables
DateTime variables store dates and time values.
Examples:
- Invoice dates
- Login times
- Scheduling information
Categorical and Numeric Variables
The learner guide also explains that variables may be classified as:
Categorical Variables
Categorical variables represent labels or categories rather than numerical measurements.
Examples include:
- Gender
- Country
- Department
- Transport method
Categorical variables may be:
| Type | Description |
|---|---|
| Nominal | No natural order |
| Ordinal | Categories with order |
Numeric Variables
Numeric variables store measurable numerical values.
Numeric variables may be:
| Type | Description |
|---|---|
| Discrete | Whole number values |
| Continuous | Decimal values |
Understanding variable types is important because workflows and automation activities require correct data handling.
KT0102: Variables Panel
The Variables Panel is a section within an RPA toolkit or automation platform where variables are created, viewed, edited, and managed.
The Variables Panel allows developers to:
- Create variables
- Rename variables
- Assign data types
- Set default values
- Define variable scope
- Monitor workflow data
In workflow development environments, the Variables Panel helps organise information used during automation execution.
Typical information displayed in a Variables Panel includes:
| Field | Purpose |
|---|---|
| Variable Name | Identifies the variable |
| Variable Type | Defines stored data |
| Scope | Determines where the variable can be used |
| Default Value | Initial stored value |
Proper variable management improves:
- Workflow organisation
- Readability
- Debugging
- Automation reliability
KT0103: Scope of Variable
Variable scope refers to where a variable can be accessed and used within a workflow.
Scope is important because not all variables should be available everywhere in an automation process.
Correct scope management improves:
- Workflow performance
- Security
- Organisation
- Error reduction
Local Scope
A locally scoped variable can only be used within a specific activity or workflow section.
Example:
A variable created inside a loop may only work within that loop.
Global Scope
A globally scoped variable can be accessed throughout the workflow or project.
Global variables are useful when multiple workflow sections require the same information.
Importance of Variable Scope
Proper scope management helps prevent:
- Variable conflicts
- Incorrect data usage
- Memory inefficiencies
- Workflow confusion
Automation developers should use the smallest scope necessary for a variable.
KT0104: Arguments
Arguments are used to pass information between workflows, activities, or automation processes.
While variables store information inside a workflow, arguments transfer information between workflow components.
Arguments are important because large automation projects often contain multiple workflows working together.
Arguments may transfer:
- Customer details
- Invoice information
- File paths
- Status values
- Calculation results
Example:
A login workflow may pass username information to another workflow using arguments.
Arguments improve:
- Workflow communication
- Modularity
- Reusability
- Process organisation
KT0105: Arguments Panel
The Arguments Panel is the section of an automation platform where arguments are created and managed.
The Arguments Panel allows developers to:
- Create arguments
- Set argument directions
- Assign data types
- Transfer information between workflows
- Configure workflow communication
Typical information displayed in an Arguments Panel includes:
| Field | Purpose |
|---|---|
| Argument Name | Identifies the argument |
| Direction | Defines information flow |
| Type | Defines data format |
The Arguments Panel supports structured workflow communication and integration.
KT0106: Argument Directions
Argument directions define how information moves between workflows.
There are commonly three argument directions used in RPA platforms.
In Arguments
In arguments pass information into a workflow.
Example:
A customer ID is passed into a workflow for processing.
Out Arguments
Out arguments return information from a workflow.
Example:
A workflow returns a generated invoice number.
In/Out Arguments
In/Out arguments allow information to move both into and out of a workflow.
These arguments are useful when workflows both receive and update information.
Importance of Argument Directions
Correct argument direction improves:
- Workflow communication
- Data flow
- Process organisation
- Automation accuracy
Incorrect argument configuration may result in missing or incorrect workflow data.
KT0107: Argument vs Variable
Although variables and arguments both handle data, they serve different purposes in automation workflows.
| Variables | Arguments |
|---|---|
| Store data within workflows | Transfer data between workflows |
| Used internally | Used for workflow communication |
| Limited by scope | Move data across workflow boundaries |
| Temporary workflow storage | Workflow integration mechanism |
Example of Variables
A workflow stores a customer name temporarily while processing an invoice.
Example of Arguments
One workflow sends customer details to another workflow for validation.
Importance of Understanding the Difference
Understanding variables and arguments is important because automation developers must know:
- Where information should be stored
- How workflows communicate
- How data moves through automation processes
Correct use of variables and arguments improves workflow efficiency, reliability, and maintainability.
Variables and Arguments in RPA Environments
In RPA environments, variables and arguments are essential because workflows constantly process information.
Bots may use variables and arguments to:
- Store transaction information
- Transfer customer details
- Manage workflow states
- Process files
- Pass information between automation modules
Without variables and arguments, automation workflows would not be able to handle dynamic business information effectively.
Key Notes
- Variables store information during workflow execution.
- Common variable types include string, integer, Boolean, decimal, and DateTime.
- Variables may also be categorical or numeric.
- The Variables Panel is used to create and manage variables.
- Variable scope controls where variables can be used.
- Arguments transfer information between workflows.
- The Arguments Panel manages workflow arguments.
- Argument directions include In, Out, and In/Out.
- Variables store data internally, while arguments move data between workflows.
- Correct use of variables and arguments improves workflow organisation and automation reliability.