# Recipe: a queue-based process with REFramework

> Build a transactional RPA process from the REFramework template that pulls items from an Orchestrator queue, with retries, logging, and exception handling.

This recipe builds a transactional process from the Robotic Enterprise Framework (REFramework) template: it pulls items from an Orchestrator queue, processes each one, and handles retries and exceptions the way an enterprise process should. It shows how a coding agent works with UiPath's standard template for resilient, high-volume automation.

## Prerequisites

- A coding agent set up for UiPath work, with an authenticated session (see [Install and set up](install-and-set-up.md)).
- An Orchestrator queue with at least 2 sample items, or a request for the agent to create one.

## Build the process

1. Open your coding agent in an empty project folder.
2. Describe the task and name the template:

   "Create a new RPA project from the REFramework template that processes items from the `Invoices` queue in Orchestrator. For each item, read the invoice fields, post them to our finance system, set the transaction status, and retry on failure."

3. Review the generated project: the Init, Get Transaction Data, Process, and End Process states, the `Config` file, and the built-in logging and exception handling.
4. Complete the Process stage with the business logic for each transaction.
5. Set the queue name, retry count, and any assets in the `Config` file rather than hard-coding them.
6. Ask the agent to run the Workflow Analyzer and a single test transaction.
7. Confirm items move through the queue with the right status, such as Successful, Failed, or Retried.
8. Confirm that exceptions are logged.

**Result:** a queue-driven, transactional process built on REFramework, with retries, logging, and exception handling in place.

:::note
The generated structure and run commands vary by agent and prompt. Confirm success from the queue item statuses and the logs, not from the agent's "done" message.
:::
