Create resource Version 5 (Java)
Action group: Orchestrator Subgroup: Resource queues
Description
The action creates a new resource in the specified resource queue
- The action sends a request to create a new resource in the resource queue stored in the Orchestrator database
- When a resource is created, the server assigns it a unique identifier. Resource identifiers are unique in the Orchestrator database as a whole, regardless of which tenant the resource queue is added to
- The specified queue is searched according to the following rules:
- If the robot project is started, the queue will be searched only in the tenant under which the user logged into the Studio. If the queue is found, respectively, there is access to work with it.
- If a ready-made robot is started, the queue will be searched only in the tenant to which the robot itself is added (added either to the tenant itself or to its group). If the queue is found, respectively, there is access to work with it.
- The action can immediately block a new resource for reading or writing if the corresponding input parameters are filled in. In addition, the date of unblocking the resource will be specified. The presence of the unblocking date means that the resource will be blocked until the specified date, even if the robot has already finished its work. When the specified date occurs, the Orchestrator server side will remove the blocking itself. However, the current instance of the robot can also remove the blocking if it performs the corresponding action
- When blocking a resource, this robot instance becomes the owner of the set type of blocking. Being the owner of the blocking means that only the same robot instance can remove this blocking. And 2 different launches of the same robot (2 different instances) are considered as different owners
- The user has more authority than robots, so they can remove/set the blocking regardless of who owns it
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Resource queue | The name of the resource queue in which the new resource will be created. | Robin.String | Yes | |
Value | The value that will be written to the new resource. | Robin.Object | Yes | |
Tags | A collection of strings where each element is a separate tag of a new resource. | Robin.Collection | No | |
Priority | The priority of the new resource over other resources in the queue. If the field is empty, the resource will be given priority 0. | Robin.Numeric | No | |
Temporarily stop reading | The date on which the read lock was automatically released. Must be greater than the current date. If the field is filled, the new resource will be blocked immediately. | Robin.DateTime | No | |
Temporarily stop writing | The date on which the write lock was automatically disabled. Must be greater than the current date. If the field is filled, the new resource will be blocked immediately. | Robin.DateTime | No | |
Results | ||||
Tags | A collection of strings where each element is a separate tag of a new resource. | Robin.Collection | ||
Priority | The priority of the new resource over other resources in the queue. | Robin.Numeric | ||
Date of creation | The date and time the resource was created. The new resource’s creation date and time coincides with the date and time of its last update. | Robin.DateTime | ||
Date of update | Date and time the resource was last updated. The new resource’s creation date and time coincides with the date and time of its last update. | Robin.DateTime | ||
Identifier | The unique identifier of the new resource. | Robin.String |
Special conditions of use
None.
Example of use
Task
It is necessary to create a resource in the resource queue with priority 2 and output its identifier to the log.
Solution
Use the actions "Create resource", "Message in log".
Implementation
- Create a variable of type String, which will be the value of the created resource.
- Move the Create resource action to the workspace and set its parameters
- "Resource queue" field - Specify the name of the resource queue to which the resource to be created will be added.
- "Value" field - Specify the created variable "resource value".
- "Priority" field - Specify the priority of the new resource among other resources of the queue.
3. Move the "Message in log" action to the workspace and set its parameters.
- "Message" field - Specify the result (Identifier) of the "Create resource" action
4. Launch the robot using the "Start" button in the top panel.
Result
The program robot completed successfully.
A new resource was created in the corresponding resource queue, with a priority of 2. The ID of the new resource was also output to the log.
Обзор
Инструменты контента