What is a diffrefrence between Coded Workflow and Code Source File

I was going through the new Coded Workflow , im understanding the coded workflow and coded test case , but can anyone explains what is the differences between coded workflow and code source file , as it seems same to me at first

@indiedev91

*A CODE SOURSE FILE typically refers to a file that contains the source code of a software program. This source code can be written in various programming languages such as C#, Java, Python, etc.
*Source code files have extensions like .c, .cpp, .cs, .java, .py, etc., depending on the programming language used.
*These files are typically edited by software developers and contain the instructions that define how a program should behave.

CODED WORKFLOW could be a term used in the context of workflow automation tools like UiPath or other Robotic Process Automation (RPA) platforms.
*In this context, a “Coded Workflow” may refer to a workflow that includes custom code activities or scripts to perform specific tasks.
*Coded workflows in RPA often involve using programming languages (e.g., C# in UiPath) to extend the capabilities of the automation platform by writing custom code to handle complex tasks or integrate with external systems.
*It allows developers to combine visual and code-based elements to create more flexible and powerful automation processes.

Cheers…!

Stil not clear about this , can you give some examples

Hi @indiedev91

In UiPath, there isn’t a concept known as “Coded Workflow” or “Code Source File” in the standard terminology. It’s possible that you are referring to “Invoke Code” and “External Workflow” activities or something similar. Let me explain the concepts associated with these activities:

Coded workflows – used for designing standard workflows . Coded test cases – used for designing test cases. Code source files– used for creating code that you can later invoke or call in other coded file types.

  1. Invoke Code Activity:
  • This activity allows you to write custom VB.NET code directly within your workflow using an integrated code editor.
  • You can use it to create custom automation logic, calculations, or manipulate data using VB.NET.
  • The code is typically contained within the workflow, making it part of your automation process.
  1. External Workflow:
  • This is where you create a separate workflow file (XAML) that contains a sequence of activities.
  • External workflows are reusable components that you can call from other workflows.
  • You can use the “Invoke Workflow” activity to call an external workflow from within your main workflow.

Code sourse file (Ex)

using System;

class Program
{
static void Main()
{
Console.WriteLine(“Hello, World!”);
}
}

Coded Workflow: (Ex)

namespace MyUiPathProject
{
public class MainWorkflow
{
public static void Main()
{
Console.WriteLine(“Starting UiPath Coded Workflow”);

        Console.WriteLine("Finished UiPath Coded Workflow");
    }
}

}

tanks for the code , but i dont want code , i said what is differences for the purpose , if you think bout it both of the code u shown do the same thing , so what is a need of source file ?

or i can say what are the use cases in a rpa projects and how can source file be benifical in a scenario where coded workflow cant be

@indiedev91

I see you’re inquiring about the differences between a “coded workflow” and a “code source file” in the context of a new concept you’re exploring. While the specific terminology “coded workflow” is not a widely recognized term in software development as of my last knowledge update in September 2021, I can provide some general insights into how these terms might be distinguished:

  1. Coded Workflow:
  • A “coded workflow” could refer to a structured and automated sequence of code execution that performs a series of tasks or operations. This could be part of a larger process or system.
  • It might involve combining multiple code source files, libraries, or modules to create a specific, end-to-end workflow that accomplishes a particular goal.
  • A coded workflow could involve orchestrating various components, such as data processing, integration with external services, and decision-making logic, through code.
  1. Code Source File:
  • A “code source file” typically refers to an individual file that contains source code written in a specific programming language. These files are used to define the behavior of a software application.
  • Code source files are the building blocks of software. They contain the instructions, functions, classes, and logic that make up the software’s functionality.
  • These files are usually organized into modules, libraries, and packages, and they are responsible for implementing specific features or functionalities within the software.

In summary, the key distinction is that a “coded workflow” seems to encompass a higher-level concept that involves orchestrating code and processes to achieve a specific objective, while “code source files” refer to the individual files containing the source code that defines the functionality of a software application. The specifics of these terms may vary depending on the context in which you encountered them, so it’s important to refer to the documentation or context of the new concept you’re exploring for a precise definition and understanding.

cheers…!

Source files are the files that developers write and edit. When you’re writing code in a programming language such as C++, Java, C#, Python, etc., you’re creating source files. These files contain the instructions, logic, and algorithms that define the behavior of a program.

Source files are crucial for debugging. When you encounter errors or unexpected behavior in a program, you typically debug from the source code. Debuggers allow you to set breakpoints, inspect variables, and step through the code in the source files to identify and fix issues.

Source files serve as documentation. Comments and inline documentation in the source code explain the purpose and functionality of the code, making it easier for other developers to understand and modify the code.

To transfer code between developers and systems. You can share your source code with others so they can compile and run the same program on their own machines.

Essential for maintaining and extending software. As software evolves, developers need access to the source code to add new features, fix bugs, or update the program to work with changing requirements or environments.

@indiedev91

example:

  1. code source file:

a)If you’re developing a Python application, a code source file might be named main.py and contain Python code defining the application’s behavior.

  1. Coded Workflow:

Suppose you’re developing a web application.

  • Code Source Files: These are where you write the application code (e.g., HTML, CSS, JavaScript, backend code).
  • Version Control (e.g., Git): You use code to manage your source code, track changes, and collaborate with a team.
  • Continuous Integration/Continuous Deployment (CI/CD) Pipeline: You create a coded workflow that automates the build, test, and deployment process. This might involve using code (e.g., YAML files) to specify how your code is built, tested, and deployed.

in a CI/CD pipeline, you could have a YAML file

This is the point im a little confused, u mean let supoose there is a scenario where you are working on an application in your rpa projects , and there is a need of a code to be executed before the software runs or at any given point , for application to run properly or to enable some functionality or any sort of thing related to the application itself , thats what you are tryin to say ?

I have a scenario in mind. For example, let’s consider automating a process within the SOAG application (Dummy Application Name). In this case, there is a specific data scraping task that needs to be performed. However, due to a legacy application, it lacks accurate selectors, making the data scraping process quite challenging. Since automation is essential, and the legacy software plays a crucial role in the company’s daily operations, it can’t be put on hold for an update just to accommodate the automation process.

One potential solution could involve making minor adjustments to the application at the point where automation needs to be initiated. This way, the data scraping can be successfully carried out. This approach seems to be the most viable option for addressing the issue in this Source File Example. Please feel free to correct me if I’m mistaken.

1 Like

This is the basic difference

Feature Coded workflows Code source files
Type Visual Text-based
Programming language UiPath’s own programming language C#
Complexity Simple Complex
Typical use cases Automating tasks in web browsers or desktop applications Automating tasks that involve interacting with databases or other systems

And for this

your proposed solution is a viable option for addressing the issue of data scraping from a legacy application with inaccurate selectors. By making minor adjustments to the application at the point where automation needs to be initiated, you can create more reliable and accurate selectors.

some examples of minor adjustments that you can make to the application:

  1. Add unique identifiers to the data elements that need to be scraped.

  2. Change the attributes of the data elements to make them more easily selectable.

  3. Change the structure of the HTML or XML code to make the data elements more accessible.

It is important to note that making changes to a legacy application can be risky. Therefore, it is important to back up the application before making any changes. It is also important to test the application thoroughly after making any changes to ensure that it is still working as expected.

Hope this clarifies

Cheers @indiedev91

1 Like

In a nutshell:

A Coded Workflow would be the counterpart to the visual Workflows that we have traditionally been creating in UiPath. Instead of drag-n-dropping components to the canvas, we can refer to activities with code.

A Code Source File is also a C# code file, but not a workflow. You can use it in case you want to utilize traditional programming language features in UiPath, like creating custom object classes, etc.

You could also say that a Coded Workflow is a specialiced Code Source File. It includes the necessary usings, it is a subclass of CodeWorkflow and includes an Execute method which has the Workflow attribute. You can Invoke a coded workflow with the Invoke Workflow File activity.

You wouldn’t be able to change the application itself from UiPath. For that you’d need the application’s existing code, and unless you / your company owns the application, that’s out of your reach. Also to compile an entire application, you generally would need Visual Studio. The Coded Source File feature of UiPath is intended for lesser scope than entire applications.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.