Working With Orchestrator Resources
Working With Orchestrator Resources
Working With Orchestrator Resources
Storage buckets are Orchestrator entities used for storing files which can
be used in automation projects. UiPath Studio offers a set of activities to
simplify working with storage buckets. These activities are available in the
UiPath.System.Activities pack, under Orchestrator.
Queues are containers that can hold an unlimited number of items. Items
can store multiple types of data, by default in free form. If a specific data
schema is needed, it can be uploaded at queue creation in the form of a
JSON file.
In the next video, we'll first create a queue in Orchestrator. Then we'll
move to Studio, where we'll create a dispatcher to populate a queue, and
a performer to take the data from the queue and input it on a website.
Creating queues
Queues are easily created in Orchestrator from the entry in the menu with
the same name. They are folder entities, which allow setting up fine-
grained permissions.
When creating a queue, you set the maximum number of retries (the
number of times you want a queue item to be retried) and the Unique
Reference field (select Yes, if you want the transaction references to be
unique). You can update existing queue settings, such as:
To ensure an optimal use of the robots, queues are typically used with the
Dispatcher-Performer model of running automations. In this model, the
two main stages of a process involving queues is separated:
Working with queues and queue items is done using the specific activities
from the UiPath. System.Activities official package, under Orchestrator.
These are:
Add Transaction Item– The robot adds an item in the queue and starts
the transaction with the status 'In progress'. The queue item cannot be
sent for processing until the robot finalizes this activity and updates the
status.
Get Transaction Item– Gets an item from the queue to process it,
setting the status to 'In progress'.
in order of Priority—and
according to the set Deadline for items with the same Priority.
according to the rule First In, First Out for items with the same
Priority.
For example, a queue item that's due today at 7:00 pm and has a
Medium priority is processed first, before another item that has no due
date and a High priority.
Queue item statuses- A queue item can have one of the statuses below.
These will be set automatically following human user and robot actions,
and/or using the Set Transaction Status activity. Custom sub-statuses can
be set for queue items which are 'In Progress', using the Set Transaction
Progress activity.
New–
The item was just added to the queue with Add Queue Item, or
the item was postponed, or
a deadline was added to it, or
the item was added after an attempt and failure of a previous queue
item with auto-retry enabled.
In Progress– The item was processed with the Get Transaction Item or
the Add Transaction Item activity.
When an item has this status, the custom progress status is also
displayed, in the Progress column.
Retried– The item failed with an application exception and was retried (at
the end of the process retried, the status will be updated to a final one -
Successful or Failed.
Deleted– The item has been manually deleted from the Transactions
page.
Apart from these above, queue items which have been abandoned or
failed can enter a revision phase. In such a case, there are specific
revision statuses, set by the reviewers. Check out the diagram below
where both types of statuses are illustrated.
The Stop mechanism
After the Stop signal is sent, the process ends when it is safe to do so.
This requires using the Should-Stop activity and a Stop mechanism in a
workflow. It registers if the Stop button has been pressed in Orchestrator
before the execution flow reaches the Should Stop activity. This is like
saving a computer game before exiting as opposed to shutting down the
computer.
In the Queues lesson, you've seen the most complex model of transaction
processing. But not the only one. If this is not your first course that
covers the capabilities of UiPath Studio, then you've seen the other two
models.
If this is your first course covering UiPath Studio, don't worry! You will
easily grasp the other two models of transaction processing.
Okay! So, business processes can be very different from one another. But
it is usually possible to classify them based on how they repeat certain
steps when processing data.
When considering these steps and how they are repeated, we can divide
business processes into three categories: linear, iterative, and
transactional.
1. Linear
The process steps are performed only once. If the need is to process
different data, the automation needs to be executed again. For example,
an email request coming in triggers an automation which gathers data
and provides a reply to the sender. The process is executed for each
individual email.
Linear processes are usually simple and easy to implement, but not very
suitable to situations that require repetitions of steps using different data.
2. Iterative
The steps of the process are performed multiple times, but each time
different data items are used. For example, instead of reading a single
email on each execution, the automation can retrieve multiple emails and
iterate through them doing the same steps.
3. Transactional
However, this is not a rule for all cases, and the category should be
chosen according to the characteristics of the process (e.g., data being
processed and frequency of repetitions) and other relevant requirements
(e.g., ease of use and robustness).
What is a transaction?
You need to read data from several invoices that are in a folder, and input
that data into another system. Each invoice can be seen as a transaction,
because there is a repetitive process for each of them (i.e. extract the
data and input it somewhere else).
When looking for a new apartment, a robot can be used to make a search
according to some criteria. For each result of the search, the robot
extracts the information about the property and inserts the data into a
spreadsheet. In this case, the details page for each property constitutes a
transaction.