- 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-021 - Hardcoded Timeout
- 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
- ST-USG-005 - Hardcoded Activity Arguments
- ST-USG-009 - Unused Variables
- ST-USG-010 - Unused Dependencies
- ST-USG-014 - Package Restrictions
- ST-USG-020 - Minimum Log Messages
- ST-USG-024 - Unused Saved for Later
- ST-USG-025 - Saved Value Misuse
- ST-USG-026 - Activity Restrictions
- ST-USG-027 - Required Packages
- ST-USG-028 - Restrict Invoke File Templates
- ST-USG-032 - Required Tags
- ST-USG-034 - Automation Hub URL
- Variables
- Arguments
- Imported Namespaces
- Coded automations
- Introduction
- Registering custom services
- Before and After contexts
- Integrating OpenAI with Coded Workflows
- Apply for a loan with UiBank
- Queue generation with coded workflows and Orchestrator APIs
- Using imported library projects in coded automations
- Trigger-based Attended Automation
- Control Flow
- Object Repository
- Logging
- The ScreenScrapeJavaSupport Tool
- Studio testing
- Extensions
- About extensions
- SetupExtensions tool
- UiPathRemoteRuntime.exe is not running in the remote session
- UiPath Remote Runtime blocks Citrix session from being closed
- UiPath Remote Runtime causes memory leak
- UiPath.UIAutomation.Activities package and UiPath Remote Runtime versions mismatch
- The required UiPath extension is not installed on the remote machine
- Screen resolution settings
- Group Policies
- Cannot communicate with the browser
- Chrome extension is removed automatically
- The extension may have been corrupted
- Check if the extension for Chrome is installed and enabled
- Check if ChromeNativeMessaging.exe is running
- Check if ComSpec variable is defined correctly
- Enable access to file URLs and Incognito mode
- Multiple browser profiles
- Group Policy conflict
- Known issues specific to MV3 extensions
- List of extensions for Chrome
- Chrome Extension on Mac
- Group Policies
- Cannot communicate with the browser
- Edge extension is removed automatically
- The extension may have been corrupted
- Check if the Extension for Microsoft Edge is installed and enabled
- Check if ChromeNativeMessaging.exe is running
- Check if ComSpec variable is defined correctly
- Enable access to file URLs and InPrivate mode
- Multiple browser profiles
- Group Policy conflict
- Known issues specific to MV3 extensions
- List of extensions for Edge
- Extension for VMware Horizon
- SAP Solution Manager plugin
- Excel Add-in
- Troubleshooting
Studio user guide
This tutorial shows you how to build an automation that generates random queues using the Orchestrator APIs, accessed from Swagger. The automation creates a new queue, generates queue items with random data, and adds them to the queue.
Prerequisites:
- For this example, you need to use a Library or a Test Automation. But you can use coded workflows for any type of RPA process.
- System.Activities 23.10
- Testing.Activities 23.10
- Add a new service (Orchestrator) in the Services section of your Studio project.
- Add the Orchestrator API Swagger definition of the instance that you want to use under File or Link, then click Load. To get the swagger definition link, visit API References.
- Deselect all endpoints, except QueueDefinitions, then click Save.
- Create a Coded workflow by selecting New, and then Coded Workflow from the File group.
- Inside the Execute method, create an instance of the HttpClient object, by calling the
BuildClient(String, Boolean)method. This method builds and HTTP Client with a specified scope.
The method takes two parameters, that have the following default values:
scope "Orchestrator"- The OAuth 2.0 scope for which to get an access token.force True- Generates a new access token.
var client = BuildClient();
var client = BuildClient();
-
Create an instance of the QueueDefinitionsClient, pass the client instance as a parameter, and assign it to a variable named queueClient. This client variable is used to interact with the Orchestrator's Queue Definitions APIs.
var queueClient = new QueueDefinitionsClient(client);var queueClient = new QueueDefinitionsClient(client);

-
Generate a queue name and create a new queue.
var queueName = "SampleQueue" + Guid.NewGuid().ToString("N"); var queue = queueClient.PostAsync(new QueueDefinitionDto() { Name = queueName }, null).Result;var queueName = "SampleQueue" + Guid.NewGuid().ToString("N"); var queue = queueClient.PostAsync(new QueueDefinitionDto() { Name = queueName }, null).Result;

-
Create a Parallel For Each loop to iterate over a range of numbers between 0 and 100. Use a dictionary to store the values for Address, FirstName, and LastName. Generate random values for these items, using the Address, GivenName, and LastName coded automation APIs. In this scenario, a Parallel For Each is used instead of a simple For Each, with the purpose of improving the performance of the automation.
Parallel.ForEach(Enumerable.Range(0, 100), i => { var data = new Dictionary<string, object>() { { "Address", testing.Address("Romania", "Bucharest")["City"].ToString() }, { "FirstName", testing.GivenName() }, { "LastName", testing.LastName() } };Parallel.ForEach(Enumerable.Range(0, 100), i => { var data = new Dictionary<string, object>() { { "Address", testing.Address("Romania", "Bucharest")["City"].ToString() }, { "FirstName", testing.GivenName() }, { "LastName", testing.LastName() } };

-
Add the random data to a queue, using the AddQueueItem coded automation API.
system.AddQueueItem(queueName, null, DateTime.UtcNow, data, DateTime.UtcNow, QueueItemPriority.Normal, i.ToString(), 100);system.AddQueueItem(queueName, null, DateTime.UtcNow, data, DateTime.UtcNow, QueueItemPriority.Normal, i.ToString(), 100);
Sample project
To follow the steps, download the following sample project: Queue generation with coded workflows and Orchestrator APIs.