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
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.
A linear sequence is sufficient for a prototype. A production process that handles thousands of items requires more. REFramework supplies the following:
The central design principle is separation of concerns: business logic is implemented in Process.xaml, while the framework governs everything around it.
The framework resides in Main.xaml, which implements a state machine with four states.
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.
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.
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.
The process closes applications, records completion and terminates. Depending on the design, a summary notification can also be sent at this point.
The table below summarizes how the process moves between states under each condition.
| From state | Condition | Next state |
| Init | Initialization succeeds | Get Transaction Data |
| Init | Initialization fails and retry limit is reached | End Process |
| Get Transaction Data | Item available | Process Transaction |
| Get Transaction Data | No items remain, or stop signal received | End Process |
| Process Transaction | Success | Get Transaction Data |
| Process Transaction | Business rule exception | Get Transaction Data |
| Process Transaction | System exception, within retry limit | Init (recovery) |
| Process Transaction | System exception, retry limit reached | End 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
Knowing where each component lives makes the template far easier to customize safely.
A project created from the template contains the following principal elements:
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.
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:
| Sheet | Purpose | Example |
| Settings | Process-specific values | Queue name, input folder paths |
| Constants | Values that change infrequently | Retry limits |
| Assets | Names of Orchestrator assets to load | Credential 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
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.
| Features | Business rule exception | System exception |
| Definition | The data or a business rule is invalid | A technical failure occurred |
| Examples | Missing invoice amount; customer not found | Application crash; element not found; timeout |
| Does retrying help? | No. The same item fails again. | Often, after recovery |
| Framework response | Marks the item as failed (business) and proceeds | Closes 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) |
Recovery behavior is where most implementation questions arise, so it merits close attention.
Retry behavior depends on how transactions are sourced.
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.
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.
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.
At scale, REFramework is usually paired with a second process that supplies it with work.
Larger automations are commonly divided into two processes:
This separation offers three advantages:
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
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 item | Expected queue status | Expected log behavior |
| Valid invoice | Successful | Transaction started, then completed |
| Missing amount | Failed (business) | Business rule exception logged, no retry |
| Simulated application crash | Retried, then Failed if limit reached | System 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
Most production issues trace back to a small set of recurring mistakes.
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:
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.
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.
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.
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.
It stores settings, constants and asset names outside the workflow, allowing behavior to change without editing the automation.
No. UiPath describes it as suitable for both attended and unattended processes.
No. Queues are the most common pattern, but the template also includes a sample that works with Excel input data.
It is a UiPath-published template on the UiPath Marketplace that builds on the classic framework. Consult the listing for its current feature set.