Introducing UiPath-Coded Workflow

Jobin Thekkekara Joy
4 min readJul 29, 2023

--

Coded workflows are the same as low-code workflows, the only difference being that you build them using separate interfaces. Normal workflows have a visual design interface whereas in Coded workflows have a code-based interface.

Additionally, you can integrate coded workflows with low-code activities and workflows and use a hybrid automation approach. This enables you to combine the benefits of code-based automation with the visual design of low-code components.

How to Get Started with Coded Automation:

The 2023.6 Community release introduces an exciting feature called Coded Automation, which is now available as a Public Preview. This article will guide you through the process of getting started with Coded Automation and explore the various file types you can create.

Both coded workflow and coded test case automations use the CodedWorkflow base class from the UiPath.CodedWorkflows package. This class gives the automation access to necessary interfaces for activity packages (services), based on the installed packages in your project.

Prerequisites

· Install UiPath Studio 2023.6.

· Install the versions of the activity packages, also known as services, supported in coded automation:

System.Activities 23.6-preview
UiAutomation.Activities 23.6-preview
Testing.Activities 23.6-preview

Creating a New Project

To begin, you need to create a new Modern or Portable project. Both Visual Basic (VB) and C# are supported as workflow expression languages, providing you with flexibility in your development process.

Once you have created your project, you can proceed to create three new types of files (Coded Workflow, Coded Test Case and Code Source File) within the Coded Automation framework. Each file type serves a specific purpose and offers unique functionalities as in the below inline screenshot.

Coded File Types

Benefits

Here are some of the benefits of using coded automations:

1. Enhanced productivity — If you’re familiar with coding or scripting you can leverage your skills and increase your productivity. Working within a familiar coding environment allows you to develop more efficient automation.

2. Complexity management — Coded automations provide a flexible solution for managing complex automation scenarios. By using code, you can implement custom logic, manage exceptions, and create reusable functions.

3. Hybrid automation — You can use coded automations interchangeably with low-code automations. This promotes seamless integration between the two approaches, enabling you to create flexible automation solutions.

4. Improved performance — Coded automations empower you to optimize your automation workflows to enhance performance. By using code, you can implement specific algorithms to make your automation executions faster.

5. Readability — Coded automations allow you to create structured code, resulting in code readability. If you organize your code and document it, you can easily maintain it and share it with other collaborators.

Why Choose Coded Automations Over Low-Code Solutions?

· Coded automation offers higher productivity and flexibility, allowing developers to handle complex automation tasks with ease.

· Coded automation has an edge in collaboration, enabling efficient code reviews, bug fixing, and simultaneous work on different parts of the automation project.

· Coded automation provides structured and organized code, enhancing readability and maintainability compared to convoluted logic in low-code solutions.

· Coded automation allows fine-tuning for optimal performance, including algorithm optimization and efficient resource utilization.

· Transitioning to coded automation is easier for developers with coding experience, leveraging existing knowledge and skills.

· Developers can unlock a new level of productivity, complexity management, collaboration, reviewability, readability, and performance with coded automation.

· Coded automation empowers developers to create powerful, efficient, and customizable automation.

Sample Project:

This project will be responsible for login into UiBank web application (https://uibank.uipath.com/) and creating a savings account based on the input data.

Step 1: Create a new process in UiPath Studio with Windows compatibility and Language as either VB or C#

Step 2: Create an object repository based on your requirement as in the below inline screenshot

Object Repository for the project (Add or Delete Elements based on the requirement)

Step 3: Create the coded workflow logic to log in to UiBank web application and call it on Main.xaml as in the below inline screenshot

Fig 1 of 3 Coded Workflow for UiBank Account Login
Fig 2 of 3 Coded Workflow for UiBank Account Login
Fig 3 of 3 Coded Workflow for UiBank Account Login
Calling Coded Workflows in Main.Xaml

Step 4: Upon a successful UiBank login, invoke the coded workflow for applying for new account and display the newly generated account number

Fig 1 of 2 Coded Workflow for Applying New Account
Fig 2 of 2 Coded Workflow for Applying New Account

Conclusion:

Coded Automations open doors to Hybrid Automation by enabling the integration of external systems, cutting-edge technologies, and emerging trends. Developers can leverage external integrations and utilize the latest advancements to create more powerful and advanced automation solutions. This code-centric approach offering, developers to unleash their creativity and build highly customized and efficient automation.

Start exploring the Coded automation and revolutionize your automation journey with UiPath Studio today!

--

--

Jobin Thekkekara Joy
Jobin Thekkekara Joy

Written by Jobin Thekkekara Joy

Technology driven professional working as a Technical Account Manager. Possess strong knowledge in requirement analysis and coding/development.

No responses yet