Automation Developer Associate Training CKP V9 week 2

Module Overview

  • Week 2 Lesson: Variables, Constants, and Arguments in UiPath Studio

Learning Objectives

  1. Data Management in Studio:

    • Understand how data is stored, processed, and passed between actiAutomationvities/workflows.

  2. Common Data Types:

    • Identify common data types in UiPath Studio and their conversion methods.

  3. Variables and Arguments Creation:

    • Learn to create and configure variables, arguments, and arrays in automation projects.

  4. Global Constants and Variables:

    • Explain global constants/variables and their use in automation projects.

Key Concepts

Variables

  • Definition:

    • Containers that hold data values of specific data types (numeric, text, etc.).

  • Properties:

    • Name: Identifier of the variable.

    • Type: Data type stored (e.g., String, Int32).

    • Value: Current data held by the variable.

    • Scope: Defines accessibility within the program.

  • Characteristics:

    • Can hold multiple values.

    • Dynamic; can change during execution.

Creating Variables

  • Methods:

    • Variables panel.

    • Activity properties panel.

    • Data Manager panel.

  • Best Practices:

    • Assign meaningful names.

    • Follow naming conventions (PascalCase).

    • Keep variables in the innermost scope to reduce clutter.

Data Types

  • Basic Types:

    • String, Numeric, Boolean, DateTime.

  • Complex Types:

    • Array (fixed size), List (dynamic size), Dictionary (key-value pairs).

Conversion Methods

  • Used to change one data type to another (e.g., Convert.ToString, Convert.Int32).

Arguments

  • Definition:

    • Similar to variables, but specifically for passing data between workflows.

  • Properties:

    • Have directional properties: In, Out, In/Out.

  • Use cases:

    • Suitable for complex automation projects where data flows between workflows.

Special Cases

Global Constants and Variables

  • Purpose:

    • Centralized data accessed by the entire automation project.

  • Characteristics:

    • Global constants cannot be altered; global variables can be modified.

Arrays

  • Definition:

    • Store multiple values of the same data type with fixed sizes.

  • Creation Example:

    • IntArray = {34, 25, 1}

  • Accessing Elements:

    • Indexed access (e.g., IntArray(0) returns 34).

Exercises

  1. Exercise 1: Create a process for user input and log messages.

  2. Exercise 2: Implement a calculation workflow for summing double values.

  3. Exercise 3: Calculate VAT and display purchase details.

  4. Exercise 4: Build a flight reservation process using user input and array variables.

robot