Automation variables
In Pega Robot Studio, you use variables to store and manipulate different types of data values. All variables available in Pega Robot Studio are similar to those .NET developers use in conventional software development, including the following variables:
- String
- Sensitive Data
- Integer
- Boolean
- Double
- Char
- DateTime
In addition to these variables, Pega Robot Studio also provides variables that store font, colors, and data in Rich Text Format. Access to variables occurs in the Variables section of the Toolbox. You drag and drop the desired variable from the Toolbox onto the automation. Dragging the variable for the first time creates the design block of the variable value, refreshes the property grid allowing you to set default values, and finally adds it to the Locals section of the Palette.
For example, the CheckCoverage automation takes the date of a client’s accident and compares it to the end date of coverage for an insurance policy.
In the following image, click the + icons to learn more about the use of variables in the automation.
Scope for automation variables
Similar to other programming languages, the scope of variables is changeable from local to global. Local variables are accessible only within a specific automation. Global variables are accessible to all the automations throughout a project. When adding variables to an automation, they display within the Palette under either the Locals or Globals sections. Variables are classified as Local by default within Pega Robot Studio.
For the Sensitive Data variable, it treats all values as a String data type. If the Sensitive Data variable is local to the automation but is passed to other automations, a best practice is for the developer to mark other automation variables or parameters as sensitive to keep the data hidden or logged.
Globals
Pega Robot Studio provides a way to manage global variables across your project called Globals. Each project contains a single Globals item, added by default. There, you add global variables that are accessible to all automations throughout your project. In comparison, local variables are only added directly to specific automations. You view the Globals project item from the project screen once you open Pega Robot Studio.
Check your knowledge with the following interaction.
This Topic is available in the following Module:
Want to help us improve this content?