In the section available:

Resource queues are needed to store data and access it sequentially. 

Resource queues are used for the purpose of:

  • speeding up data processing (e.g., when 2 or more robots work in parallel)
  • sharing data between robots, especially if the robots execute on different hosts
  • receiving data in a certain order

All data in the queue is represented as resources. A resource is an object that consists of:

  • Values. This is data of various types (string, number, collection, folder path, etc.)
  • Parameters. Parameters of a resource are its additional properties required when searching and working with resources. More information about parameters: "Resource queue card"

A resource queue can work with:

  • User - through the Orchestrator interface
  • Program robot using actions that can add new resources to the queue, delete old ones, get and change their value and parameters. These are actions from the "Orchestrator" group, "Resource queues" subgroup:
    • Create resource
    • Modify a resource
    • Get resource collection
    • Get resource by ID
    • Get a resource by condition
    • Unlock a resource
    • Delete resource
    • Terminate resource processing

Resource queues

Resource queues table description

A table with previously created resource queues. 

Column/button name

Description

"Resource queue" column

Resource queue name

This is a link (button) that opens the card of the selected resource queue

If a launch condition is created in which this queue is specified, an icon is displayed next to its name:

  • - if the launch condition is enabled
  • - if the launch condition is disabled
"Number of resources" columnCurrent number of queue resources

"Delete" button

When clicked, a window appears to confirm the deletion:

  • If no launch condition has been configured on the queue:
  • If a launch condition has been configured on the queue:

"Refresh" button
image-2024-5-29_12-44-37.png

The records in the table are updated as soon as you click on it

Use the "Columns" dropdown list to select which columns will be hidden or displayed, with the "Resource queue" column always displayed.

Creating a resource queue

To create a new resource queue, you need to:

  1. Click the "Create resource queue" button in the "Resource queues" section. The "Create resource queue" window opens
  2. Enter the name of the new queue in the "Resource queue name" field. The name must be unique.

  3. Click on the "Create" button to confirm your choice. Or click on the "Cancel" button if you decide not to create it.

  4. When you click on "Create", the window will be closed and the new resource queue will be added to the table.

Resource queue card

In the "Resource queue" card available:

Queue resource table description

The table contains a list of queue resources with their parameters.

Column/button name

Description

"ID" columnA unique identifier that the system assigns to each queue resource when it is created
"Status" column

Shows the status of the resource

Each resource can have 1 of 4 statuses:

  • New
  • In progress
  • Processed
  • Error

Details about statuses are described below

"Attempts to process" column

Number of remaining attempts to process the resource

For more information about processing attempts, see below

"Tags" column

Words or phrases that additionally describe the resource (mostly needed when a robot searches for the resource)

If there are too many tags, only some of them are displayed. All others are visible only by clicking the button 

"Priority" column

Priority of resource processing relative to other resources in the queue

"Blockings" column

You can view what current blockings the resource has in place

There may be the following values:

  • If no value is specified, the resource is not blocked
  • If "Read only" is specified, the resource is blocked only for reading
  • If "Write" is specified, the resource is blocked for writing only.
  • If "Read" and "Write" are specified at the same time, the resource is blocked for both reading and writing. The resource has a combination of these blocking features

If a resource is blocked with the date when the blocking was lifted, there will be an icon next to the name of the corresponding blocking. If you hover over the icon, you can see the date and time when the blocking was lifted:

More about blocking is described below

"Author" column

Initiator of resource creation

Since currently only robots can create resources, the column will contain:

  • robot name
  • host name on which the robot was working when the resource was created
  • name of the account under which the robot was working
"Creation date" columnThe date and time the resource was created. Displayed based on the time zone of the user who is working with this interface
"Editor" column

The initiator of the last change to the resource. Both the robot and the user can modify the resource, so:

  1. If the initiator is a user, the user's full name is specified
  2. If the initiator is a robot, it is specified:
    • robot name
    • host name, on which the robot was working at the moment of resource creation
    • account name under which the robot was working
"Update date" columnThe date and time when the resource was last modified. Displayed based on the time zone of the user who is working with this interface

"Refresh" buttonimage-2024-5-29_12-44-37.png

By clicking on it, the records in the table are updated

"Edit resource parameters" button

By clicking on it, the "Resource parameters" window opens

Details of the window are described below

"Delete" button

When you click on it, a window appears confirming the deletion of the resource:

Use the "Columns" dropdown list to select which columns will be hidden or displayed, with the "ID" column always displayed.

Launch condition based on resource queue

You can customize the launch of the robot so that it is activated depending on the availability of resources in the queue. To do this, you need to create a launch condition based on the resource queue. You can create such a launch condition:

  • In the "Launch conditions" section on the "Resource queues" tab
  • From the card of the queue on the basis of which the launch condition should work. If the condition has not yet been configured for this queue, the "Create launch condition" button will be displayed in its card - clicking on it will open an empty card of the launch condition in the creation mode. If a condition has already been configured for the queue, the "Open launch condition" button will be displayed - clicking on it will open the card of the existing launch condition in the read mode

For more information on creating, viewing and modifying such a launch condition, see section "Launch conditions".

Changing resource queue parameters

Currently, only the "number of attempts to process resources" parameter is available as a queue setting. This parameter limits the number of attempts to process the same resources if the robots constantly fall into an error when working with them. 

Consider the operation of this parameter by example:

  1. The robot tries to retrieve the value of the resource, but crashes into an error due to some problem.
    The user restarts the robot.
    The robot tries to get the resource value again, and again crashes in error. 

Obviously, you can't fix the problem by simply restarting the robot. And at the next attempts the robot will still terminate with an error, and eventually will not be able to complete its work. To prevent the robot from getting stuck on the problem resource, skip it and take the next resource in progress, you can limit the number of attempts to process the resource.

Limiting resource processing attempts works as follows:

  1. The robot failed to process the resource (get or change it) and crashed into an error.
  2. The number of remaining attempts is reduced by 1.
  3. The user restarts the robot, but it crashes again in progress with the same resource.
  4. The number of remaining attempts is again reduced by 1.
  5. And so on. Eventually, when the number of remaining attempts becomes 0, the status of the resource will change to "Error".
  6. The system hides resources that are in "Error" or "Processed" status from robots. Therefore, when the robot launches again, it will not find this resource in the queue, even if it searches by its ID.

If the robot has successfully obtained or changed a resource, the value of the remaining attempts does not change. 

To configure this parameter, follow the steps:

  1. Click the "Change resource queue parameters" button. The "Resource queue parameters" window opens:
  2. If the maximum number of attempts must be strictly defined, you must activate the "Limit the number of attempts to process resources" checkbox. In this case, the "Number of attempts" field will be active to specify the maximum number of possible attempts.
  3. If you do not want to limit the number of resource processing attempts, you must deactivate the "Limit the number of resource processing attempts" check box.
  4. Click the "Save" button to confirm the changes you have made. Or click on the "Cancel" button if you decide not to apply the changes. 

You cannot specify different maximum number of attempts for different resources. This is a common parameter for all resources in the queue. The remaining attempts are counted separately for each resource. For example, if the maximum value is 3, the robot failed to process the 1st resource twice and the 2nd resource once. As a result, the 1st resource will have the number of remaining attempts "1 out of 3" and the 2nd resource will have "2 out of 3".

If the maximum number of attempts is changed (downward or upward), the number of attempts remaining for all resources in the "New" or "In progress" status will be equal to the new maximum value.

Operating principles and status changes

Statuses are needed for:

  • Searching for resources by robots. For example, robots should only search for resources in the "New" status.
  • Determining the current progress of resource processing - how many resources have already been processed, how many are still in progress, how many are not yet in progress, which resources have had problems.
  • Preventing re-processing of the same resources. Robots will not be able to retrieve or modify resources that are already in "Processed" or "Error" status.

The main features of setting and working of statuses:

  1. When you create a resource, it will automatically be assigned the status "New". Only robots can create resources at the moment.
  2. The "In progress" status is automatically set only when a robot reads (receives) or modifies a resource. If blockings were immediately set when creating a resource, it is not considered a resource modification operation, so the status will be "New" and not "In progress".
  3. The "In progress" status will not be set automatically when the resource is read or modified by the user.
  4. If the robot has read/modified the resource, but has completed its work without putting it into the "Processed" status, the resource will remain in the "In progress" status.
  5. If the resource is already in the "In progress" status, another robot can still access the resource to read/modify it.
  6. Robots will not be able to find resources in the queue that are in "Processed" status. Even the robot that set this status itself will not be able to find it.
  7. If the number of attempts to process a resource becomes equal to 0, the resource status changes automatically to "Error". Robots will not be able to find resources in the queue that are in the "Error" status.
  8. The user can change the resource status to any other status in any order. 

Resource blocking working principles

If robots have to process resources from the same queue, they will start taking the same resources without additional constraints. To prevent this from happening, you can use the resource blocking mechanism.

Resource blocking mechanism works as follows:

  1. Robot 1 reads the 1st resource and immediately blocks it for other robots.
  2. The 1st resource is already blocked by Robot 1, so Robot 2 will not be able to get it and will start reading the 2nd resource. And will also block the 2nd resource for other robots.
  3. Robot 1 finishes the 1st resource and sets its status to "Processed".
  4. Robot 1 searches for the next resource. The 2nd resource is already blocked by Robot 2, so Robot 1 cannot get it and starts reading the 3rd resource, blocking it for other robots.
  5. Robot 2 finishes the 2nd resource and sets its status to "Processed".
  6. Robot 2 searches for the next resource:
    • The 1st resource is already in "Processed" status, so Robot 2 will not find it
    • The 3rd resource is already blocked by Robot 1, so Robot 1 will not be able to retrieve it.
    Eventually Robot 2 will start reading the 4th resource, blocking it for other robots.
  7.  Etc.

Thus, two robots process queue resources sequentially without overlapping each other.

The one who sets the blocking is its initiator. There are several rules regarding initiators:

  • If blocking is set by a robot, the initiator is not the robot itself, but its instance. For example, the same robot is launched twice, i.e. 2 instances of the robot. The 1st instance blocks the resource, and becomes the initiator of this blocking. The 2nd instance will no longer be able to control this blocked resource, since the 1st instance is the initiator of this blocking.
  • A set blocking does not impose any restrictions on the initiator of that blocking. The initiator can process its blocked resource and remove the set blocking.
  • If the initiator of the blocking is a robot, it does not impose any restrictions on the user: he can read, change the resource, including changing the set blocking. Robots do not have such rights: if the initiator of blocking is anyone but a given robot instance, the robot will be restricted from working with the resource.

Robin platform provides several types of blocking:

  1. Read only. If a resource is blocked for reading, it will be hidden by the system from all other robots except the initiator of this blocking. Robots will not be able to find the resource with a search by condition, and since robots cannot find the resource, they will not be able to read or modify it. However, there is a small exception when trying to find a resource by its exact identifier (if it is known in advance):
    • If you search for a resource to read it, the robot will be able to find the resource, but it will wait for the reading blocking to be lifted (the maximum waiting time is configured in the corresponding robot action). That is, the resource still cannot be read without unblocking it
    • If a resource is searched to be changed, the robot will be able to find and change the resource, since blocking on reading does not block the resource from being changed
  2. Write only. If a resource is only write-locked, other robots (except the initiator) will be able to find the resource and get its value and parameters. But they will not be able to change the resource. If a robot tries to change such a resource, the robot will wait for the write blocking to be removed (the maximum waiting time is configured in the corresponding robot action).
  3. Read and write. Resources blocked both for writing and reading have a combination of the features of these blockings. It is allowed that these blockings may have different initiators.

If a robot has blocked resources and has not unblocked them before it finishes its work, the system will automatically remove these blockings. Only blockings that have a specific date set for their removal will not be removed.

Setting a delayed blocking release date

In some situations, it may be necessary to remove blocking from resources not immediately after the robot finishes its work, but much later.

For example, the robot receives some values on a daily basis. But their further processing and application are possible only by the end of the month due to the lack of access to some required data or applications at the moment. In this case, you can add all the received values to the queue as resources and block them by setting the date of unblocking. Until the specified date the resource will be blocked and no robot will take it to work. This blocking will be removed automatically when the specified date and time occurs, after which robots will be able to start processing them. You can set an unlocking date for both read and write blocking.

Both the robot and the user can set this unblocking date.

Changing resource parameters

To change the parameters of a resource, follow the steps:

  1. Click the "Change resource parameters" button in the row with the desired resource (in the resource table). The "Resource parameters" window opens:
  2. Make the necessary adjustments.
  3. Click on the "Save" button to confirm the changes made. Or click on the "Cancel" button if you decide not to apply the changes. 

"Resource parameters" window description

Button/field name

Description

Resource IDUneditable string with the identifier of the resource whose parameters were opened

"Status" field

A dropdown list where you can change the status of the resource

Possible statuses:

  • New
  • In progress
  • Processed
  • Error

A user can change the status of a resource to any other status in any order

"Tags" field

Words or phrases that additionally describe the resource (mostly needed when a robot searches for the resource)

Each tag has a button in the form of a cross to delete it

A field for entering a new tag is added as soon as you click the button . The maximum number of characters allowed when entering a tag is 30

"Priority" field

Priority of resource processing relative to other resources in the queue

Valid values: integers from 0 and higher

"Lock for reading" checkbox

If the checkbox is enabled:

  • the resource will be blocked for reading
  • the field "Unblocking date for reading" is active for editing
  • the initiator of blocking is displayed on the right side

Details on how blocking works are described above

"Unblocking date for reading" field

A field for entering the date and time until which the resource will be blocked for reading

If the resource was blocked by the robot and the user changes or removes the date in this field, the user becomes the initiator of blocking the resource

The required date/time value can be specified manually or using the date and time selection form that opens by clicking the button

If the "Lock for reading" checkbox is disabled, this field is not editable

"Lock for writing" checkbox

If the checkbox is enabled:

  • the resource will be blocked for recording
  • field "Unblocking date for writing" is active for editing
  • the initiator of blocking is displayed on the right side of the field

Details on how blocking works are described above

"Unblocking date for writing" field

A field for entering the date and time until which the resource will be blocked for writing

If the resource was blocked by the robot and the user changes or removes the date in this field, the user becomes the initiator of blocking the resource

The required date/time value can be specified manually or by using the date and time selection form that opens by clicking the button .

If the "Lock to record" checkbox is off, this field is not editable.

"Save" buttonWhen the button is clicked, the window closes and all changes made are saved

"Cancel" button

When you click on it, a window appears confirming that you want to cancel the changes you have made:



  • Нет меток