UiPath Orchestrator

Managing Queues in Studio

Adding Items to a Queue

  1. In the Queues page, create a queue.
  2. In Studio, create an automation project that, for example, collects certain figures from an Excel spreadsheet and stores them in a variable.
  3. From the Activities panel, drag an Add Queue Item activity to the Designer panel.
  4. In the Properties panel, in the QueueName field, type the name of the queue created at step 1, between quotation marks.

Note:

The queue names are not case sensitive. For example, "Test_QuEuE" and “test_queue” are the same.

  1. From the Priority list, select Low, Normal or High, depending on the importance of the items that are added by this activity and how fast you want them to be processed.
  2. (Optionally) In the Reference field, enter a string or string variable to act as an identifier for a queue item or a group of them. (The reference can be used to link your transactions to other applications used within an automation project. Additionally, this feature enables you to search for certain transactions, in Orchestrator, according to the provided custom reference.)

Important!

References are not compatible with the 2016.2 or lower versions of Orchestrator or Robot.

  1. (Optionally) In the Deadline field, add a date until which the items must be processed.
  2. (Optionally) In the Postpone field, add a date when to start processing the queue items.
  3. Next to the ItemInformation field, click the Browse browse button. The ItemInformation window is displayed, that enables you to add data to each created queue item.

Note:

The value of the string arguments added in the ItemInformation window cannot contain the following characters: [ and " ".

  1. Click Create Argument. A new blank argument is created.
  2. Change the name of the argument to something more suggestive for your needs.
  3. Change the Type of the argument to what you need. For example, if you want to store numerical values from transactions, select Int32.
  4. In the Value field, enter the value that you want to add to queue items or a variable that you use to store a specific value.
  5. Click OK. Your settings are saved.

Important!

Place these types of automation projects in a loop. Otherwise, only one item is created and populated in Orchestrator.

The data added in the ItemInformation window in Studio is displayed in the Item Details window, under Specific Data, in Orchestrator. All items added to queues have the status set to New.

Getting Items from a Queue and Changing their Status

  1. In Orchestrator, consider you have a queue populated with items.
  2. In Studio, from the Activities panel, drag a Get Transaction Item activity to the Designer panel.
  3. In the Properties panel, in the QueueName field, type the name of the populated queue from Orchestrator, between quotation marks.

Note:

The queue names are not case sensitive. For example, "New_QueUe" and “new_queue” are the same.

  1. Create a QueueItem variable. This variable stores the first item from a queue, according to its priority and deadline. When placed in a loop, the Robot iterates through all queue items. After a queue item passes through this activity it is NOT processed, and the status of the item changes to In Progress.
  2. In the TransactionItem field, enter the QueueItem variable created previously.
  3. From the Activities panel, drag a Decision activity under the Get Transaction Item activity.
  4. Create your automation requirements. For example, add the transaction items to an Excel spreadsheet and send e-mails with this information.
  5. In the Properties panel, in the Condition field, type a condition (for example, the queue item is empty) based on which the status of the item can change.
  6. From the Activities panel, drag a Set Transaction Status activity and connect it to the False branch of the Decision activity. All transaction items that pass through this activity do not meet the condition added at step 7.
  7. In the Properties panel, from the Status drop-down list, select Successful. This status is applied to all queue items that pass through this activity.
  8. In the TransactionItem field, enter the QueueItem variable used at step 5.
  9. (Optionally) Click the Browse browse button next to the Analytics field and enter the data that you want to be displayed in the Item Details window, in the Analytics field.
  10. (Optionally) Click the Browse browse button next to the Output field and enter the data that you want to be displayed in the Item Details window, in the Output field.

Note:

This information is only displayed if the queue item is processed successfully.

  1. Drag another Set Transaction Status activity to the Designer panel and connect it to the True branch of the Decision activity. All queue items that pass through this activity meet the condition added at step 7.
  2. In the Properties panel, from the Status field, select Failed. This status is applied to all queue items that pass through this activity.
  3. In the TransactionItem field, enter the QueueItem variable used at step 5.
  4. From the ErrorType list, select Business or Application, depending on the condition you put in the Decision activity. For example, an empty queue item could be an application exception, while a transaction value being smaller than a standard value could be a business exception. For more information on this choice, see the Business Exception vs Application Exception article.
  5. In the Reason field, type a string to explain why the exception was triggered. After the project is executed, this information is displayed in the Item Details window.
  6. Connect both Set Transaction Status activities to the Get Transaction Item activity. This creates a loop and enables you to iterate through all queue items. A basic automation project should look as in the following screenshot.

A mapping of the properties in the Set Transaction Status activity (on the left) and their corresponding fields in the Item Details window in Orchestrator.

To retrieve specific data from a queue item, you can use the SpecificContent() function. Write the name of the argument that was used to add information to the queue between quotation marks in brackets.

For example, the screenshot above displays the Value field of an Assign activity. It enables you to retrieve the value attributed to a queue item (displayed in the Item Details window, under Specific Data, in Orchestrator) and assign it to a string variable, so that you can process it later.

In the screenshot above:

  • transItem - is a QueueItem variable used to store transaction items.
  • .SpecificContent - is the function that retrieves information from transaction items.
  • ("transactionID") - is the name of the argument that was added in the ItemInformation window to populate the queue items with data. The argument name is also displayed in the Item Details window, under Specific Data, in Orchestrator.
  • .ToString - is a function used to convert the ID of the queue, which was initially an integer, to a string.

Postponing a Transaction Item

  1. In Orchestrator, consider you have a queue populated with multiple items.
  2. In Studio, consider you already have a Get Transaction Item activity that iterates through all queue items.
  3. From the Activities panel, drag a Decision activity to the workflow. The activity enables you to make a business decision, based on which to postpone some queue items. For example, if the value of a bill is grater than 3000$, you might want to postpone its payment.
  4. From the Activities panel, drag a Postpone Transaction Item activity to the True branch of the Decision. This means that all queue items that meet the condition placed in the Decision activity are postponed according to your configurations.
  5. In the TransactionItem field, enter the QueueItem variable used in the Get Transaction activity.
  6. In the Postpone field, add the date after which this item can be processed.
  7. In the Deadline field, add the date before which this item has to be processed.
    The Deadline and Postpone properties add a new priority to queue items. For example, a queue item which is due today at 7 pm and has a Medium priority is processed first, before another item that has no due date and a High priority.

Note:

Modifying the deadline of a queue item or postponing it changes its status to new.

For details on the processing order of transactions, see here.

Adding a Custom Progress

  1. In Orchestrator, consider you have a queue populated with a lot of items (millions) with the In Progress status.
  2. In Studio, consider you already have a Get Transaction Item activity that iterates through all queue items and uses a QueueItem variable.
  3. From the Activities panel, drag a Set Transaction Progress activity to the Designer panel.
  4. In the TransactionItem property of the activity, enter the QueueItem variable.
  5. In the Progress property, add a custom string to describe the progress reached here, such as "BeforeFirstDecision". That lets you know that the item has been retrieved from the Orchestrator database. If your automation project crashes at this point during the execution, one item has this status, and it is displayed in the Progress column.

Important!

Custom progress statuses are only displayed while an item has the InProgress status.

The remainder of the automation project can be set as explained above. A basic workflow should look as in the following screenshot.

Updated 2 months ago



Managing Queues in Studio


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.