UiPath REFramework

UiPath REFramework

Tisha
December 4th, 2026
6
5:00 Minutes

Think about developing an automation that can take care of hundreds of transactions at once with no breakdown due to any unplanned or unexpected errors in the process. That is exactly what makes UiPath REFramework a unique tool! This enables developers to make robust automation solutions that are scalable, reliable, and maintainable.

In this blog, we will try to understand how REFramework functions, what are the four different states in which REFramework runs, and how it manages exceptions, retry mechanisms, and configurations. Further, we will also try to build up a simple automation from scratch by taking the beginners through step by step process.

Read Also: A Guide To Learn RPA UiPath

What Is the UiPath REFramework?

The UiPath REFramework (Robotic Enterprise Framework) is a pre-built project template in UiPath Studio based on State Machines for building scalable, resilient, transactional Robotic Process Automation (RPA) solutions.

It embeds best practices for logging, exception handling, retry logic and configuration management so developers focus on business logic rather than boilerplate infrastructure.

Why Teams Standardize on REFramework

A linear sequence is sufficient for a prototype. A production process that handles thousands of items requires more. REFramework supplies the following:

  • Consistent structure: Every developer on a team knows where configuration, logic and recovery code reside.
  • Externalized configuration: Queue names, retry limits and application settings live in a configuration file rather than inside activities.
  • Built-in exception handling: Try-catch logic is already wired through each state.
  • Application recovery: After a technical failure, the process can close applications, reinitialize and retry.
  • Uniform logging: Transaction start, success and failure are recorded consistently, which simplifies monitoring and audit.
  • Orchestrator integration: Items are retrieved from queues and their status is reported back.

The central design principle is separation of concerns: business logic is implemented in Process.xaml, while the framework governs everything around it.

Architecture: The Four States

The framework resides in Main.xaml, which implements a state machine with four states.

1. Init

The process reads the configuration file, loads settings and assets, terminates residual processes from earlier runs and opens the required applications. If initialization fails, it can be retried a limited number of times.

2. Get Transaction Data

The process retrieves the next transaction item. In a queue-based design this is the next Orchestrator queue item. When no items remain, or Orchestrator issues a stop signal, the process proceeds to End Process. This state determines when a run is complete.

3. Process Transaction

The process executes the business logic for the current item. There are three possible outcomes: success, a business rule exception, or a system exception. Success and business rule exceptions advance to the next item. A system exception triggers recovery.

4. End Process

The process closes applications, records completion and terminates. Depending on the design, a summary notification can also be sent at this point.

State Transitions Reference

The table below summarizes how the process moves between states under each condition.

From stateConditionNext state
InitInitialization succeedsGet Transaction Data
InitInitialization fails and retry limit is reachedEnd Process
Get Transaction DataItem availableProcess Transaction
Get Transaction DataNo items remain, or stop signal receivedEnd Process
Process TransactionSuccessGet Transaction Data
Process TransactionBusiness rule exceptionGet Transaction Data
Process TransactionSystem exception, within retry limitInit (recovery)
Process TransactionSystem exception, retry limit reachedEnd Process

This follows the flow described in UiPath's own community tutorial: a system error within the retry limit returns the robot to Init, and otherwise the process ends.

Also Explore: How to Become a Robotic Process Automation (RPA) Developer

Project Structure and Key Files

Knowing where each component lives makes the template far easier to customize safely.

A project created from the template contains the following principal elements:

  • Main.xaml: the state machine.
  • Process.xaml: the location of the business logic.
  • Data/Config.xlsx: settings, constants and asset names.
  • Framework folder: reusable workflows including InitAllSettings, InitAllApplications, GetTransactionData, SetTransactionStatus, CloseAllApplications, KillAllProcesses and TakeScreenshot.
  • Exceptions_Screenshots folder: the destination for screenshots captured on application errors.

The official template documentation describes the same components: initialization of settings and applications, retrieval of data from an Orchestrator queue, transaction status updates and application shutdown.

As a general practice, modify Process.xaml, the application open and close workflows and the configuration file first, and alter the Framework folder only when a requirement cannot be met otherwise. This keeps the project maintainable and easier to upgrade.

Configuration Management with Config.xlsx

Externalizing settings is one of the framework's most practical design decisions.

The configuration workbook allows behavior to be adjusted without editing the workflow. It typically contains three sheets:

SheetPurposeExample
SettingsProcess-specific valuesQueue name, input folder paths
ConstantsValues that change infrequentlyRetry limits
AssetsNames of Orchestrator assets to loadCredential or URL asset names

At runtime, InitAllSettings loads these values into a Config dictionary in which keys are strings and values are objects. Workflows then read them as follows:

' Read the queue name from the Config dictionary
queueName = in_Config("OrchestratorQueueName").ToString
' Read a numeric setting and convert it
maxRetries = CInt(in_Config("MaxRetryNumber"))

This code retrieves values defined in Excel. If a queue is renamed, a single cell changes instead of multiple activities.

Note: setting names can differ slightly between template versions. Confirm them against the configuration file in the version you are using.

Also Read: UiPath vs Power Automate: A Comparison Guide

Exception Handling: Business Rule vs System Exceptions

How the framework reacts to a failure depends entirely on how that failure is classified.

Distinguishing these two categories is fundamental to correct behavior and is a frequent topic in technical interviews.

FeaturesBusiness rule exceptionSystem exception
DefinitionThe data or a business rule is invalidA technical failure occurred
ExamplesMissing invoice amount; customer not foundApplication crash; element not found; timeout
Does retrying help?No. The same item fails again.Often, after recovery
Framework responseMarks the item as failed (business) and proceedsCloses applications, reinitializes and retries within limits

A business rule exception is raised explicitly when the logic detects a rule violation:

' Inside Process.xaml, in a Throw activity
New BusinessRuleException("Invoice amount is missing for invoice " & TransactionItem.SpecificContent("InvoiceNo").ToString)
  • Expected behavior: the framework catches the exception in Process Transaction, logs it, marks the queue item as failed with a business error type and moves directly to the next item, without retrying or restarting applications.
  • Decision guideline: if a human operator would also reject the item, treat it as a business rule exception. If the operator would restart the application and try again, treat it as a system exception.

Retry Logic and Recovery

Recovery behavior is where most implementation questions arise, so it merits close attention.

Retry behavior depends on how transactions are sourced.

Orchestrator queues

Retries are generally governed by the queue's auto-retry setting in Orchestrator. When an item fails with a system exception and retries remain, Orchestrator makes it available again. Many developers set the local retry value in the configuration file to 0 in this arrangement so that the two mechanisms do not conflict. Community discussions describe this as common practice; verify it against your template version and internal standards.

Non-queue sources (for example, Excel input)

The retry values in Config.xlsx apply. The framework tracks the retry number and reattempts the same transaction until the limit is reached.

Why Init runs after a system exception: The framework assumes the application may be in an inconsistent state, so it resets the environment and begins from a clean state.

Caution when customizing the state machine

A forum discussion shows that removing the Get Transaction Data state requires adjusting the Init-to-End transition manually, otherwise the retry limit may never terminate the loop. Any modification to the state machine should be validated with deliberate failure tests.

The Dispatcher: Performer Pattern

At scale, REFramework is usually paired with a second process that supplies it with work.

Larger automations are commonly divided into two processes:

  • Dispatcher: gathers work from a source such as a mailbox, file or database and adds items to an Orchestrator queue.
  • Performer: the REFramework process that retrieves items from the queue and processes them.

This separation offers three advantages:

  • Several Performer robots can run in parallel to increase throughput.
  • Each failed item is tracked individually and can be retried.
  • Data collection and data processing carry different failure risks, so isolating them simplifies diagnosis.

Public GitHub repositories frequently demonstrate this exact structure, with a Dispatcher populating a queue and a Performer processing it, which reflects how the pattern is typically taught and practiced.

Also Read: Best RPA (Robotic Process Automation) Tools

Implementing a Queue-Based Performer, Step by Step

The following walkthrough builds a queue-based Performer from the template to a verified test run.

Step 1: Create the project: In Studio, select the Robotic Enterprise Framework template and assign a descriptive project name.

Step 2: Configure Data/Config.xlsx: Enter the queue name in the Settings sheet and review the retry values in Constants.

Step 3: Create the Orchestrator queue: Add a queue whose name matches the configuration file and define its auto-retry behavior.

Step 4: Implement application open and close workflows: Build workflows that open and close the required applications, and reference them in the configuration file.

Step 5: Implement business logic in Process.xaml: Read values from in_TransactionItem.SpecificContent, perform the required actions and throw BusinessRuleException for rule violations.

' Example: reading data from a queue item
invoiceNo = in_TransactionItem.SpecificContent("InvoiceNo").ToString
amount = CDbl(in_TransactionItem.SpecificContent("Amount"))

Step 6: Run the Workflow Analyzer: Resolve warnings before testing to catch naming and structural issues early.

Step 7: Test all three outcomes: Process one item that succeeds, one that raises a business rule exception and one that causes a system exception, for example by closing the target application mid-run. Then review queue statuses and logs.

Expected results (illustrative):

Test itemExpected queue statusExpected log behavior
Valid invoiceSuccessfulTransaction started, then completed
Missing amountFailed (business)Business rule exception logged, no retry
Simulated application crashRetried, then Failed if limit reachedSystem exception logged, Init runs again

Confirm success through queue item status and logs, not merely by observing that the robot finished running.

Read Also: UiPath Tutorial For Beginners

Common Implementation Errors and Corrections

Most production issues trace back to a small set of recurring mistakes.

  • Hardcoded values inside activities: Move them to Config.xlsx.
  • System exceptions raised for data problems: This triggers unnecessary retries. Use BusinessRuleException.
  • Retries configured in both Orchestrator and the config file: Select a single source of truth.
  • Testing only the success path: Failure paths cause most production incidents and must be tested deliberately.
  • Casual edits to Framework workflows: These complicate upgrades and troubleshooting.
  • Insufficient logging: Include the transaction identifier in log messages so issues can be traced quickly.
  • Non-idempotent steps: If a retry repeats partially completed work, results may be duplicated, for example a ledger entry posted twice. Design steps so that a rerun is safe.

When REFramework Is Not Required

The framework adds structure, and structure carries overhead that is not always justified.

Not every automation needs the full framework. A one-off task, a personal productivity helper or a small utility may be adequately served by a simple sequence.

REFramework is appropriate when:

  • Many items of the same type are processed.
  • Failures must be tracked per item.
  • The process runs unattended in production.
  • Multiple developers will maintain it.

Evolution of the Framework

UiPath REFramework has remained conceptually stable even as the tools and technologies surrounding it have evolved. Its core principles, including state-based processing, configuration, exception handling, and retries, continue to provide a reliable foundation for building scalable and maintainable automation workflows.

The importance of these principles becomes clearer when we look at the growth of automation. According to UiPath's 2025 Agentic AI Report, 90% of surveyed U.S. IT executives said their organizations had business processes that could benefit from agentic AI, while 37% said their organizations were already using it. These figures highlight the growing importance of automation and the need for reliable frameworks that can support increasingly complex processes.

UiPath's tools have also evolved significantly. The UiPath Marketplace offers an Enhanced REFramework template, while the REFramework-as-Library component helps developers reuse framework functionality. In 2025, Studio introduced a more compact design experience for cross-platform projects, which became available for Windows projects through settings in September. These changes help developers create and maintain workflows more efficiently.

The framework is also adapting to the growing role of AI in automation. UiPath's report found that 92% of surveyed IT executives expected their organizations to increase investments in AI or related technologies over the following year. This trend makes structured workflows, exception handling, and reliable recovery mechanisms increasingly important when integrating traditional automation with AI-driven processes.

For practitioners, the key takeaway is simple. They should focus on understanding the logic behind REFramework rather than just learning the interface. A strong understanding of its states, configuration, exceptions, and retries will help developers adapt to new UiPath features and build reliable automation solutions as the platform evolves.

Final Verdict

REFramework is not complicated. Its purpose is to build automation systems that keep running even when conditions do not match up to the best of expectations, as is typical for any enterprise.

Understand the four states, manipulate the configuration file when possible, discern differences between business exception rules and system exceptions, and test for failure just as much as you will test for success.

Frequently Asked Questions

1. What is REFramework in UiPath?

It is a state-machine-based template in UiPath Studio for building resilient, transaction-based automations with built-in configuration, logging, exception handling and retries.

2. What is the difference between a business rule exception and a system exception?

A business rule exception indicates invalid data or a violated business rule, so retrying will not help. A system exception indicates a technical failure, so recovery and retry may succeed.

3. What is Config.xlsx used for in REFramework?

It stores settings, constants and asset names outside the workflow, allowing behavior to change without editing the automation.

4. Is REFramework suitable only for unattended robots?

No. UiPath describes it as suitable for both attended and unattended processes.

5. Is an Orchestrator queue mandatory?

No. Queues are the most common pattern, but the template also includes a sample that works with Excel input data.

6. What is the Enhanced REFramework?

It is a UiPath-published template on the UiPath Marketplace that builds on the classic framework. Consult the listing for its current feature set.

About the Author
Tisha | igmGuru
About the Author

Tisha is a robotic process automation professional with experience implementing RPA solutions across finance operations and customer service workflows. Her specialties are process assessment, bot development, workflow design, and automation maintenance using platforms such as UiPath. She is also a part-time content writer, not for extra earnings but as a hobby. She says it helps her connect with learners and keep her learning new things.

Drop Us a Query
Fields marked * are mandatory
Recent Post
×

Your Shopping Cart


Your shopping cart is empty.