11.3 Bulk Operations, Transaction Status Updates & Queue Triggers

Key Takeaways

  • Bulk Add Queue Items adds up to 15,000 DataTable rows per call; each column becomes a SpecificContent key.

  • CommitType AllOrNothing adds nothing if any row fails, while ProcessAllIndependently adds valid rows and returns the failures in the Result DataTable.

  • Set Transaction Status closes an item as Successful or Failed; Failed needs ErrorType Business (never auto-retried) or Application (retried if the queue allows).

  • Queue triggers start jobs automatically as items arrive, controlled by the minimum items to start the first job, the number of new items per additional job, and the maximum pending and running jobs.

  • An item whose robot never sets a status stays In Progress and becomes Abandoned after about 24 hours.

Last updated: September 2026

11.3 Bulk Operations, Transaction Status Updates & Queue Triggers

Core Concept: Enterprise automation requires efficient high-throughput data ingestion, robust transactional status reporting, and reactive, event-driven process initiation. Using the Bulk Add Queue Items activity, Dispatcher robots ingest thousands of records in a single optimized API request. Performer robots finalize transaction states using Set Transaction Status with granular diagnostic payloads. Finally, Queue Triggers provide dynamic elasticity, automatically provisioning unattended robot jobs as queue volumes surge and terminating them when queues drain.

In early-stage RPA deployments, scheduling is often implemented using rigid time-based CRON schedules (e.g., "execute every day at 08:00 AM"). In enterprise production, however, work arrives unpredictably: batch files land late, customer web portals experience sudden transaction spikes, or regulatory filings arrive in large unexpected bursts. Modern UiPath architectures eliminate idle polling and processing lag by combining high-speed batch operations with event-driven Queue Triggers.


1. Queue Ingestion at Scale: Add Queue Item vs. Bulk Add Queue Items

UiPath Studio provides two primary mechanisms for uploading transaction payloads into an Orchestrator Queue: the iterative Add Queue Item activity and the batch-oriented Bulk Add Queue Items activity.

+--------------------------------------------------------------------------+
|                       QUEUE INGESTION ARCHITECTURES                      |
|                                                                          |
|  SCENARIO A: Iterative Add Queue Item (High Network Overhead)            |
|  [Robot] -- HTTP POST (1 Item) --> [Orchestrator DB]                     |
|  [Robot] -- HTTP POST (1 Item) --> [Orchestrator DB]                     |
|  [Robot] -- HTTP POST (1 Item) --> [Orchestrator DB] (x 5,000 requests)  |
|                                                                          |
|  SCENARIO B: Bulk Add Queue Items (Optimized Batch Architecture)         |
|  [DataTable: 5,000 Rows]                                                 |
|          |                                                               |
|          v (Single Serialized HTTP POST Payload)                         |
|  [Robot] ========================================> [Orchestrator DB]     |
+--------------------------------------------------------------------------+

Architectural Comparison

Architectural AttributeAdd Queue ItemBulk Add Queue Items
Input Data StructureIndividual properties & dictionary itemsSystem.Data.DataTable
API Call Frequency1 HTTP POST request per individual item1 HTTP POST request per batch (up to 15,000 items)
Network OverheadHigh (TLS handshakes, connection overhead per item)Extremely Low (Single serialized payload)
Ingestion ThroughputOne request per itemMany items per request, which is far faster for large batches
Item Reference FieldExplicit Reference string propertyComes from the DataTable's column mapping, such as a Reference column
SpecificContent MappingManually configured key-value pairsAutomatic: Each column header becomes a dictionary key
Error Handling OutputThrows an exception for a failed itemThe Result output DataTable lists rows that could not be added

Working with Bulk Add Queue Items

  • Input Format: Accepts a standard DataTable. Every column header in the DataTable becomes a string key in the SpecificContent dictionary of each generated queue item, and the row values become the corresponding dictionary values.
  • Batch Size Limit: The activity supports up to 15,000 records in a single batch call. If a DataTable exceeds 15,000 rows, developers should partition the data into chunks (using LINQ .Skip() and .Take()) and execute Bulk Add Queue Items in a loop.
  • Reference Mapping: UiPath notes that the DataTable can also carry references, depending on how its columns are mapped; a column named Reference supplies each item's reference. There is no separate reference-column property on the activity.
  • CommitType and the Result output: Bulk Add Queue Items has two commit types:
    • AllOrNothing adds every item only if no error occurs; on an error, nothing is added and the failing row is returned.
    • ProcessAllIndependently adds each item individually and returns the items that could not be added, such as duplicates on a queue with unique references.
    • The Result output is a DataTable holding those errors, so the dispatcher can log or reprocess them.
  • Permissions: the robot needs Queues View, Transactions Create, and Folders View on the target folder.
' Partitioning a large DataTable into 10,000-row chunks for Bulk Add
Dim intBatchSize As Integer = 10000
Dim intTotalRows As Integer = dt_MasterTransactions.Rows.Count
Dim intOffset As Integer = 0

While intOffset < intTotalRows
    Dim dt_Batch As DataTable = dt_MasterTransactions.AsEnumerable() _
                                  .Skip(intOffset) _
                                  .Take(intBatchSize) _
                                  .CopyToDataTable()
                                  
    ' Execute Bulk Add Queue Items on dt_Batch
    ' The Result output captures rows that could not be added
    intOffset = intOffset + intBatchSize
End While

2. Finalizing Transactions: Set Transaction Status

When a Performer robot processes a QueueItem, it must commit the final processing outcome back to Orchestrator using the Set Transaction Status activity. This transitions the item from In Progress to a terminal state.

Activity Parameters & Properties

  • Status: Specifies the final state: Successful or Failed.
  • ErrorType: Required when Status = Failed:
    • Business: Used for anticipated business logic violations (e.g., insufficient account funds, unsupported country code). Caught via Catch ex As BusinessRuleException. Orchestrator marks the item as Failed and never retries it.
    • Application: Used for unhandled technical faults (e.g., SQL server timeout, SAP GUI crash). Caught via Catch ex As Exception. Orchestrator marks the item as Retried (if retries remain) or Failed (if retries are exhausted).
  • Reason: A short description of the failure, shown with the item in Orchestrator.
  • Details: Granular diagnostic data (e.g., ex.ToString including full stack trace, inner exceptions, and current application window titles).
  • Output: A Dictionary(Of String, Object) containing computed business outcomes returned by the automation (e.g., payment confirmation codes, approval timestamps).
  • Analytics: A Dictionary(Of String, Object) capturing custom metrics for UiPath Insights.

Caution

If an unhandled crash or developer oversight causes a robot to terminate without executing Set Transaction Status, the item remains locked in In Progress status. It will remain locked to other robots until Orchestrator's 24-hour maintenance threshold converts it to Abandoned.

Loading diagram...
Set Transaction Status Exception Branching

3. Event-Driven Automation: Queue Triggers in Orchestrator

Traditional automation workflows rely heavily on time-based triggers (CRON schedules), launching jobs at predefined calendar intervals. However, time-based triggers suffer from two major architectural flaws:

  1. Resource Inefficiency: A robot scheduled to run every 15 minutes may wake up, find zero items in the queue, and terminate. This consumes machine runtime, generates redundant log noise, and ties up unattended licenses needed by other processes.
  2. Processing Latency: If 500 invoices arrive at 08:01 AM and the schedule does not run until 09:00 AM, items sit idle for 59 minutes, risking SLA breaches.

Queue Triggers address both problems: they start jobs based on the number of New items in the queue, so work starts soon after items arrive and no jobs start when the queue is empty.


4. Queue Trigger Configuration & Dynamic Auto-Scaling

When configuring a Queue Trigger in Orchestrator (under Automations → Triggers → Queue Triggers), administrators pick the process and queue and set three scaling thresholds:

+--------------------------------------------------------------------------+
|                       QUEUE TRIGGER CONFIGURATION                        |
|                                                                          |
|  Process Name: Production_Invoice_Performer                              |
|  Target Queue: Invoices_Processing_Queue                                 |
|                                                                          |
|  [x] Minimum number of items to trigger the first job: 1                 |
|  [x] Another job is triggered for each X new items: 10                   |
|  [x] Maximum number of pending and running jobs allowed simultaneously: 4|
+--------------------------------------------------------------------------+

The Three Scaling Thresholds

  1. Minimum number of items to trigger the first job (M):
    • The threshold of items with status New that must exist in the queue before Orchestrator starts the initial job.
    • Low-Latency Config (M = 1): As soon as a single item arrives, a job launches immediately.
    • Batch Efficiency Config (M = 20): Ensures jobs only launch when enough work exists to justify application initialization overhead.
  2. Another job is triggered for each X new items (S):
    • The scaling step increment. Orchestrator triggers an additional parallel job for each multiple of X unhandled items.
    • For example, if M = 1 and S = 10:
      • 1 to 10 items in queue → 1 Job
      • 11 to 20 items in queue → 2 Jobs
      • 21 to 30 items in queue → 3 Jobs
  3. Maximum number of pending and running jobs allowed simultaneously (J_max):
    • The hard ceiling on concurrency. Regardless of how high the queue volume spikes, Orchestrator will never allow the total count of running plus pending jobs for this trigger to exceed this number.
    • Governance Safeguard: Prevents an unexpected spike of 50,000 items from consuming every available unattended robot license in the tenant, which would starve other critical enterprise processes.

Auto-Scaling Logic

The total target number of concurrent jobs (J) calculated by Orchestrator based on the count of unhandled items (N) follows this deterministic relationship:

Target Jobs (J) = Min(J_max, 1 + Floor((N - M) / S))  [for N >= M]

Concrete Auto-Scaling Walkthrough

Assume a Queue Trigger is configured with:

  • Minimum items for first job (M): 1
  • Another job triggered for each X items (S): 15
  • Maximum simultaneous jobs (J_max): 3

Operational Event Sequence:

[Time 09:00] Queue Count = 0  --> Jobs Running = 0
[Time 09:05] Dispatcher uploads 5 items:
             - Queue Count = 5 >= 1 --> Orchestrator launches Job #1.
             - Jobs Running = 1.
[Time 09:07] Dispatcher uploads an additional 30 items:
             - Total New Items = 35.
             - Calculation: 1 + Floor((35 - 1) / 15) = 1 + Floor(34 / 15) = 1 + 2 = 3 Jobs.
             - Orchestrator triggers Job #2 and Job #3.
             - Jobs Running = 3.
[Time 09:10] Dispatcher uploads 100 more items:
             - Total New Items = 120.
             - Calculation yields 1 + Floor(119 / 15) = 8 Jobs.
             - However, J_max = 3. Orchestrator enforces the ceiling.
             - Jobs Running = 3 (Max Limit Preserved).
[Time 09:30] Robots consume items; New items drop to 0:
             - Each Performer robot calls Get Transaction Item, receives Nothing, and
               transitions cleanly to End Process.
             - Jobs Running naturally scales back down to 0.

This dynamic auto-scaling architecture delivers the pinnacle of operational efficiency: instant responsiveness during demand surges, strict licensing governance, and zero wasted robot runtimes during idle periods.

Loading diagram...
Queue Trigger Dynamic Auto-Scaling Dynamics
Test Your Knowledge

A Dispatcher workflow processes a daily spreadsheet containing 12,000 transaction records that must be uploaded to an Orchestrator Queue with unique references enabled. Which ingestion strategy provides the highest throughput and captures row-level upload rejections without halting workflow execution?

A

Use Bulk Add Queue Items with CommitType ProcessAllIndependently, passing the DataTable, and inspect the Result DataTable for rows that could not be added.

B

Use a For Each Row loop with Add Queue Item, wrapping each call in a TryCatch block and writing failed rows to a local text log.

C

Split the spreadsheet into 12 distinct Excel files and invoke Add Queue Item concurrently across 12 background threads.

D

Use the Orchestrator HTTP Request activity to execute 12,000 individual synchronous REST API POST operations.

Test Your Knowledge

In a Performer workflow built with REFramework, a transaction item fails during Process.xaml because an external banking API returns HTTP 503 Service Unavailable. To ensure the item is automatically retried by Orchestrator according to the queue's retry policy, how must Set Transaction Status be invoked?

A

Status = Successful, ErrorType = None, with HTTP 503 passed in the Output dictionary.

B

Status = In Progress, ErrorType = RetryPending, with details in the Reason property.

C

Status = Failed, ErrorType = Business, with exception details passed in the Reason property.

D

Status = Failed, ErrorType = Application, with exception details passed in the Reason and Details properties.

Test Your Knowledge

An Orchestrator Queue Trigger is configured with: Minimum number of items to trigger the first job = 1, Another job is triggered for each X new items = 15, and Maximum number of pending and running jobs allowed simultaneously = 3. If a Dispatcher suddenly deposits 35 New items into an empty queue, how many total jobs will Orchestrator launch?

A

1 job

B

3 jobs

C

2 jobs

D

4 jobs

Sections you finish are checked off in the contents.