Edit resource Version 8 (Java)

Action group: Orchestrator Subgroup: Resource queue


Description

The action edits the current value and parameters of the resource in the resource queue.

  1. The action sends a request to get the value and/or parameters of the resource created in the resource queue in the Orchestrator database. The resource is searched by the specified resource identifier.
  2. The action can deny a resource for reading or writing if the corresponding input parameters are filled in. In addition, the date of unlocking the resource will be specified. The presence of the unlocking date means that the resource will be locked 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 block itself. However, the current instance of the robot can also remove the block if it performs the corresponding action.

  3. When a resource is blocked, this robot instance becomes the owner of the set blocking type. 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.
  4. The user has more authority than robots, so they can remove/set the blocking regardless of who owns it.
  5. If the resource is already blocked for writing and the initiator is not the given robot instance, the action is pending the removal of that blocking.
  6. If an action should block a resource for reading, but it is already blocked for reading by a user or another robot instance, the action waits for the block to be lifted. If the resource is blocked for reading, but the action should not set this type of blocking, waiting for the read blocking to be lifted does not occur, it is simply ignored.

Action icon

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
IdentifierThe unique identifier of the resource.Robin.String
Yes
ValueThe new resource value.Robin.Object
No
TagsA collection of strings where each element is a separate new tag for a resource. If the field is empty, the current resource tags will not change. If a collection with 0 elements is specified, the current tags will be removed.Robin.Collection
No
PriorityThe priority of the element over other elements in the queue. If the field is empty, the resource’s current priority will not change.Robin.Numeric
No
Timeout, msThe time to wait for the lock to be released from the resource. Specified in milliseconds. If «-1» is specified, the action will wait indefinitely.Robin.Numeric
No
Temporarily stop readingThe date on which the read lock was automatically released. Must be greater than the current date. If the field is filled, the resource will be blocked immediately.Robin.DateTime
No
Temporarily stop writingThe date on which the write lock was automatically disabled. Must be greater than the current date. If the field is filled, the resource will be blocked immediately.Robin.DateTime
No
Results
TagsA collection of strings, where each element is a separate tag of the resource.Robin.Collection

PriorityThe priority of the resource over other resources in the queue.Robin.Numeric

Date of creationThe date and time the resource was created.Robin.DateTime

Date of updateThe date and time the resource was last updated.Robin.DateTime

Special conditions of use

None.

Example of use.

Task

There is a resource. Change it to priority "1" and get the date of creation of the resource.



Solution

Use the "Edit resource", "Message in Log" actions.

Implementation

  1. Move the "Edit resource" action to the workspace and set its parameters.
    1. Specify the resource ID in the "Identifier" field.
    2. Specify the new priority of the resource in the "Priority" field.
  2. Move the "Message in Log" action to the workspace and set its parameters.
    1. Specify the result (date of creation) of the "Edit resource" action in the "Message" field.
  3. Click "Start" in the top panel to start the robot.

Result

The program robot completed successfully.

The priority of the resource was changed to "1", as well as the new date of creation of the resource was output to the log.

  • Нет меток