- 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
- Variables
- Arguments
- Imported Namespaces
- Trigger-based Attended Automation
- Recording
- UI Elements
- Control Flow
- Selectors
- Object Repository
- Data Scraping
- Image and Text Automation
- Automating Citrix Technologies
- RDP Automation
- Salesforce Automation
- SAP Automation
- VMware Horizon Automation
- Logging
- The ScreenScrapeJavaSupport Tool
- The WebDriver Protocol
- Test Suite - Studio
- Extensions
- Troubleshooting
- About troubleshooting
- Microsoft App-V support and limitations
- Internet Explorer X64 troubleshooting
- Microsoft Office issues
- Identifying UI elements in PDF with Accessibility options
- Repairing Active Accessibility support
- Automating Applications Running Under a Different Windows User
- Validation of large Windows-legacy projects takes longer than expected
Workflow Design
UiPath offers four diagrams for integrating activities into a working structure when developing a workflow file:
- Flowchart
- Sequence
- State Machine
- Global Exception Handler
Sequences have a simple linear representation that flows from top to bottom and are best suited for simple scenarios when activities follow each other. For example, they are useful in UI automation, when navigation and typing happens one click/keystroke at a time. Because sequences are easy to assemble and understand they are the preferred layout for most workflows.
Flowcharts offer more flexibility for connecting activities and tend to lay out a workflow in a plain two-dimensional manner. Because of its free form and visual appeal, flowcharts are best suited for showcasing decision points within a process. Arrows that can point anywhere closely resemble the unstructured GoTo programming statement and therefore make large workflows prone to chaotic interweaving of activities.
State Machine is a rather complex structure that can be seen as a flowchart with conditional arrows, called transitions. It enables a more compact representation of logic and we found it suitable for a standard high-level process diagram of transactional business process templates.
The Exception Handler is designed to be used in both small and large automation projects, for identifying execution errors and most importantly, determining the workflow behavior when such an error occurs. If an execution error is encountered during debugging, the Global Exception Handler may be set to step in and allow you to check the workflow's behavior in accordance to the options previously set in the Exception Handler.
Decisions need to be implemented in a workflow to enable the Robot to react differently in various conditions in data processing and application interaction. Picking the most appropriate representation of a condition and its subsequent branches has a big impact on the visual structure and readability of a workflow.
The If activity splits a sequence vertically and is perfect for short balanced linear branches. Challenges come when more conditions need to be chained in an If… Else If manner, especially when branches exceed available screen size in either width or height. As a general guideline, nested If statements are to be avoided to keep the workflow simple/linear.
Flowchart layouts are good for showcasing important business logic and related conditions like nested If statements or If… Else If constructs. There are situations where a Flowchart may look good even inside a Sequence.
The VB If operator is very useful for minor local conditions or data computing, and it can sometimes reduce a whole block to a single activity.
The Switch activity may be sometimes used in convergence with the If operator to streamline and compact an If… Else If cascade with distinct conditions and activities per branch.
The Flow Switch activity selects the next node depending on the value of an expression; Flow Switch can be seen as the equivalent of the procedural Switch activity in flowcharts. It can match more than 12 cases by starting more connections from the same switch node.
Data comes in two flavors when it comes to visibility and life cycle: arguments and variables. While the purpose of arguments is to pass data from one workflow to another, variables are bound to a container inside a single workflow file and can only be used locally.
Unlike arguments, which are available everywhere in a workflow file, variables are only visible inside the container where they are defined, called scope.
Variables should be kept in the innermost scope to reduce the clutter in the Variables panel and to show only, in autocomplete, what is relevant at a particular point in the workflow.
Keep in mind that when invoking workflows with the Isolated option (which starts running the workflow in a separate system process, only serializable types can be used as arguments to pass data from a process to another. For example, SecureString, Browser and Terminal Connection objects cannot safely cross the inter-process border.
Meaningful names should be assigned to workflow files, activities, arguments, and variables in order to accurately describe their usage throughout the project.
Projects should have meaningful descriptions, as they are also displayed in the Orchestrator user interface and might help in multi-user environments.
To improve readability, variable and argument names should also align to a naming convention:
- Snake case:
First1_Name2
,first_name2
, - Upper or lower Camel case:
FirstName
,lastName
, - Pascal case:
First1Name2
,First1Name
, - Kebab case:
First-Name
,First-Name1
.
in_DefaultTimeout
, in_FileName
, out_TextResult
, io_RetryNumber
.
Activity names should concisely reflect the action taken, such as Click the Save Button. Keep the part of the title that describes the action (Click, Type Into, Element Exists, etc.).
Except for Main, all workflow names should contain the verb describing what the workflow does, such as GetTransactionData, ProcessTransaction, TakeScreenshot.
The Comment activity and Annotations should be used to describe in more detail a technique or the particularities of a certain interaction or application behavior. Keep in mind that other people may, at some point, come across a robotic project and you can try to ease their understanding of the process.