Home Platform Openbots Server Storing Shared Data in Assets

Storing Shared Data in Assets

What is an Asset?
In RPA, an Asset is exactly what it sounds like, an asset that automations can use if they are connected to Server through OpenBots Agent. It is a value that is stored in OpenBots Server to assist the user in the automation process. It is typically a credential or variable that stores data, and this stored data can be leveraged by any Agent connected to the Server. In the OpenBots Server, the format for an Asset can be JSON, Number, Text, or File.
Why Would Someone Want to Use an Asset?

There are many scenarios and reasons why an Asset would be used in RPA . A few examples include:

  • There is information that needs to be passed between projects.
  • There is information that will always be the same between multiple projects.
  • There is information that an automation needs access to but cannot retrieve on its own through normal commands.
  • There is information that is likely to change and must be filled out manually by a person.
Creating an Asset

Creating an Asset in OpenBots Server is very easy and quick to do. Please refer to the following steps on how to do it:

Step 1: Open the Server website and log in. From there click on ‘Asset’.

Step 2: Clicking on ‘Add Asset’ at the top-right of the screen will bring up the window to create a new Asset. Type in the name of the Asset and select the format. For this example, a Text Asset is being created. There are multiple types/formats that an asset can possess. Those types are Text, File, Number, and JSON. The first 3 types are self-explanatory, however JSON requires a bit more of an explanation. While JSON itself will not be explained here, it needs to be mentioned that, when the JSON type is selected, a JSON builder will appear and the asset can be constructed within it. Once the format has been selected, a new box will appear. Insert the value for the Asset. Type ‘Test’ for now. When complete, press the Save button.

Congratulations! An Asset has now been created! When an Asset is created, the ‘All Assets’ page will appear with the newly created one at the top of the list in the All Assets tab. From here, the user can view, edit, and delete any Asset. Click on the corresponding icon to complete the action.

Leveraging and Updating an Asset in OpenBots Studio

Now that an Asset has been created, it is time to test the connection between OpenBots Agent and the Server by utilizing OpenBots Studio. With the new version of OpenBots Studio (version 1.6.1 as of the date of this document was written), two new commands have been added to retrieve and update Server Assets: Get Asset and Update Asset.

*Please Note: OpenBots Agent must be installed and connected on the machine running OpenBots Studio to accurately test the Asset Commands*

The image below is a snapshot of the practice script written to test the connection between the OpenBots Agent and the Server using the Studio commands. In a few words, this script got the value of the Asset created in the previous section (‘Example’), typed it into the Google search bar (as a test), updated the asset value in Server using Studio, and re-typed the asset value in the Google search bar.

To demonstrate how to use the Asset Commands, please refer to the following steps:

Step 1: Select the Get Asset Command. A new command window will open. Do note that Get Asset will retrieve the current value stored in the asset from the OpenBots Server, so if the asset’s value is changed in Server or changed by the Update Asset command, then the value retrieved will be equal to the asset’s updated value.

  • For ‘Asset Name’, type in the name of the asset created (Example). Use double quotation marks.
  • Under ‘Asset Type’, select the format of the Asset. (Text)
  • Type in a variable name to store the asset value.
  • Click Ok.

Step 2: Select the Update Asset Command to update the asset value. When the Update Asset command is run by the automation, the asset’s value is immediately updated in the OpenBots Server. This means that if the Get Asset command is used after the Update Asset, then the updated asset value will be retrieved. This also means that, in the case of this example automation, if it were to be run a second time, then the first Get Asset command would retrieve the updated asset value and not its original ‘Test’ value. This is due to the fact that the asset’s value is retrieved from Server and its value in Server was updated.

  • Type in the asset name again.
  • Select the asset type again.
  • Type in the new value for the asset. (Updated Text)
  • Click Ok.
When the script runs, the Studio will retrieve the Asset Value from the Server and type it into the Google search bar as shown below:
Studio will then proceed to update the asset value from ‘Test’ to ‘Updated Text’ and write the value in the Google search bar in a new browser instance.
For any questions on how to use the web browser commands in this exercise, please refer the respective OpenBots Studio guides. This marks the end of the tutorial.
Newsletter Bot

Lets stay in touch!

Join our weekly newsletter and follow us on social media.

Contact Sales
Call Our Experts!