- Release Notes
- Getting Started
- Setup and Configuration
- Automation Projects
- Dependencies
- Types of Workflows
- File Comparison
- Automation Best Practices
- Source Control Integration
- Debugging
- The Diagnostic Tool
- Workflow Analyzer
- About Workflow Analyzer
- ST-NMG-001 - Variables Naming Convention
- ST-NMG-002 - Arguments Naming Convention
- ST-NMG-004 - Display Name Duplication
- ST-NMG-005 - Variable Overrides Variable
- ST-NMG-006 - Variable Overrides Argument
- ST-NMG-008 - Variable Length Exceeded
- ST-NMG-009 - Prefix Datatable Variables
- ST-NMG-011 - Prefix Datatable Arguments
- ST-NMG-012 - Argument Default Values
- ST-NMG-016 - Argument Length Exceeded
- ST-DBP-002 - High Arguments Count
- ST-DBP-003 - Empty Catch Block
- ST-DBP-007 - Multiple Flowchart Layers
- ST-DBP-020 - Undefined Output Properties
- ST-DBP-023 - Empty Workflow
- ST-DBP-024 - Persistence Activity Check
- ST-DBP-025 - Variables Serialization Prerequisite
- ST-DBP-026 - Delay Activity Usage
- ST-DBP-027 - Persistence Best Practice
- ST-DBP-028 - Arguments Serialization Prerequisite
- Variables
- Arguments
- Imported Namespaces
- Recording
- UI Elements
- Control Flow
- Selectors
- Object Repository
- Data Scraping
- Image and Text Automation
- Automating Citrix Technologies
- RDP Automation
- SAP Automation
- VMware Horizon Automation
- Logging
- The ScaleCoordinates Migration Tool
- The ScreenScrapeJavaSupport Tool
- The WebDriver Protocol
- StudioPro
- Extensions
- Troubleshooting
Studio User Guide
ST-NMG-002 - Arguments Naming Convention
ST-NMG-002
Scope: Workflow
This rule analyzes all arguments in the project and determines whether they follow the specific convention.
Arguments in the project should follow a specific naming convention to make it easier to understand the project and maintain it. The argument name should be meaningful and include an indication of its type:
- in – the argument can only be used within the given project.
- out – the argument can be used to pass data outside of a given project.
- io – the argument can be used both within and outside of a given project.
Make sure all arguments follow the naming convention. The default Regex expression for this rule is:
- InRegex:
^in_(dt_)?([A-Z]|[a-z])+([0-9])*$
- OutRegex:
^out_(dt_)?([A-Z]|[a-z])+([0-9])*$
- InOutRegex:
^io_(dt_)?([A-Z]|[a-z])+([0-9])*$
.
According to the above regex expression, the argument matches the expression if it starts with a prefix, followed by a lower or upper case letter, and a number.
in_HelloWorld
then it is validated by the rule. Other examples of argument names that follow this regex rule are: out_HelloWorld
and io_Helloworld
.
In the Project Settings window, select the Workflow Analyzer tab. Find and select the rule, as in the image below:
[A-Z]
part of the expression for In arguments, the search pattern becomes ^in_(dt_)?([a-z])+([0-9])*$
. Now the rule checks if In arguments start with a lower case letter after the prefix.
[a-z]|[A-Z])
, then the rule becomes ^in_(dt_)?([A-Z]|[a-z]|[a-z]|[A-Z])+([0-9])*$
, and recognizes in_HelloWonderfulWorld
as a valid In argument name.
The default regex expression for this rule can be changed to another naming convention. Check the list below:
Camel case
The camel case convention specifies that each word in the middle of the argument name begins with a capital letter, with no intervening spaces or punctuation.
^in_(dt_)?([A-Z]|[a-z]|[0-9])+([A-Z]|[a-z]|[0-9])
.
in_Hello1World2
, in_helloWorld
, in_Hello1World
.
Pascal case
The Pascal case naming convention specifies that the argument name must contain concatenated capitalized words.
^in_(dt_)?([A-Z]|[0-9])+([A-Z]|[a-z]|[0-9])
.
in_Hello1World2
, in_HelloWorld
, in_Hello1World
.
Kebab case
The Kebab case naming convention is similar to snake case, except that it replaces spaces with hyphens rather than underscores.
^in_(dt_)?([a-z]|[A-Z]|[0-9])+‐([a-z]|[A-Z]|[0-9])
in_Hello1‐World2
, in_Hello‐World
.
The default values for ST-NMG-002 Regex are:
- InRegex:
^in_(dt_)?([A-Z]|[a-z])+([0-9])*$
- OutRegex:
^out_(dt_)?([A-Z]|[a-z])+([0-9])*$
- InOutRegex:
^io_(dt_)?([A-Z]|[a-z])+([0-9])*$
.
To reset these values to default right-click a rule in the Project Settings window, and then click Reset to default.