Subscribe to receive exclusive content and notifications
Working with UiPath Data Service Entities | Persistence Data storage | Preview in UiPath 20.08
In this Blog Post, We have covered every details about Newly Introduced Data Services component of UiPath RPA tool. Topics Included are as below-
- Introduction to Data Service and How to Enable it
- Some Common Use Cases of Data Service
- Managing Entity, Creating Relation Ship
- Working Example with Data Service and Entity
- Details around the Data Service Studio Activities
- Challenges and Issues if any
Let’s get started.
- UiPath Studio v2020.8 +
- Data Service Enabled Orchestrator Instance (You can request for Enterprise Free Trail)
- UiPath Robot Connected to Modern folder
This Blog is meant to show step by step guide to Use newly introduced Data Service from UiPath.
To experience the full features Data Service and follow along the demos in this course, you need an Enterprise account in UiPath Automation Cloud.
If you don’t have such a plan, you can start an Enterprise Trial now and use it after Enabling the Data Service for your Tenants.
In 20.10 LTS, Data Service will become available both on-premises and through the Automation Cloud for community.
Table of Contents
If you wish to follow the code example shown in this blog post, You can download that from the GitHub URL.
Following along with the code is the best thing to do when you are trying your hands on a new concept in UiPath.
UiPath Data Services Example
Setup and Configuration
To start using the Data Service you need an Automation Cloud account, and You need to enable Data Service for the tenant you wish to use.
You can Enable the Data Service using below steps –
- Login in Cloud Portal –https://cloud.uipath.com/
- Navigate to Admin Section; Then Tenants (Its Tenant level service so must be activated in the tenant you want to use.)
- Click on sub menu and Navigate to Edit Service for enabling the Data Service
- Select the Data Service
Once you select the Data Service, you need to Update License so that Data Service Gets reflected at Admin Dashboard.
It might take few minutes, before it gets refreshed and once this is done you will be able to see screen like below.
So far so good, Now you should be able to create your New Entity on Data Service.
We will look at How to create an entity, manage the relationship and other stuff in the next section when we work on Example of Suppliers and Products Entity.
But this is pretty simple steps all you need to do is define the Fields and their Datatype.
Please Note – All the Action on Data Service are based on user authorization and it will inherit Your permissions based on their configured roles/groups.
You can read more about roles and grants on Data Service UiPath Documentation – How to Configure required access setup for Data Service.
Let’s talk about, where we can use Data Services in a real-life example. I have listed a few sample use cases but it can be extended to many scenarios where storage and persistence data is required.
Common Use Cases of Data Service
Data Service provide you additional storage capability for your intelligent automation projects so that you can integrate your business data with UiPath Different components on the fly.
You must be thinking, why we need additional storage capability for Storing RPA projects data while you can connect/dump/export data to Relational databases, No SQL Databases, file or even on cloud storage.
Why do we need additional layer of Data Services for Consuming the data in RPA projects?
Below is some common use case where we can fit in Data Services –
- Most of the process we design follow simple workflow which takes data from queue, work on queue item in linear way to complete the task either through completion or success. However, there could be more completed scenarios like Multi step process, where automation need to be worked in Different chunks or handholding is required between Human in Loop and Robot.
For Example: #Bot1 perform some task in CRM to create entry, Waits for Human to complete the next steps and then #Bot2 resume the task based on status. In this case, we can create two related Entity to track the status of Work done by #Bot1 and perform tasks accordingly.
- Think about an Ecommerce-operator where he is selling the product on different platform and requests are received throughout the day from omnichannel which contains multiple Structured and unstructured data set such as Invoice, Purchase return, Customer Complain, Sales Order and many other items.
Through the use of multiple related entity all different kind of request can be processed effectively and within SLA adherence without putting much data (Master Tables) exposed to RPA.
- Think about Parent/Child Relationships work items where individual Work Queue items must be linked to a single request for better processing.
For example, Customer Account Closure example, where customer various steeps need to be followed in Different application, In all such cases we can create parent child relationship entity to perform sub-tasks and then update status in parent to get task completed.
Managing Entities, Relationship and Using Activities Example
For this part of Blog, We have taken the example of Products and suppliers where we will go through the following steps.
- Create Two Entities (Products/Suppliers)
- Establish Relationship among the entities using the Common Field SuppliersID
- Enable Data Services activities in UiPath Studio.
- Work with Create Entity Record activity and Query Related Records
Let’s work on the first Dataservice Working Example.
How to Create Entities
The benefit of using entities created in the Data Service is that you can manage and manipulate data aggregated in a single object.
- For Creating Entities, You can click on Create New Entity (+) Menu item at the top right corner of the screen and provide Display Name, Name and Description of entity you wish to create. These fields are self-explanatory.
- Once you create the entity, 5 System Generated Columns are automatically added to support the audit and changes required of the entities.
- You can create your field by clicking on “Create New Field” button.
[See Example below, where 5 Fields are system built-in type and rest others are created as per need.]
- System Generated ID field by default would be Unique and will uniquely represent the records in the entity.
- For creating a Relationship In the Entities list, first, select the entity for which you want to add a relationship. then click Create New Field.
- Select Relationship from the Type drop-down list.
- Now, Select the entity to which you want to create a relationship from the Related Entity drop-down list.
[In the Below, Example SupplierID is the Display name which creates a relationship with Suppliers entity]
How to Use Entities In UiPath Studio
So far we have created, Two entities which are shown below, for Using them inside the studio you need to perform the following steps.
- You need to add UiPath.DataServices.Activities to Perform required Operations
- You need to import Entities so that processes that collect, update, and pass data to other processes can be managed inside the studio.
- Imported entities will become visible in the Project panel, its namespace is imported as well and you can find it in the Imported Namespaces list, and it is available in the Referenced assemblies list:
Enable Data Services Activities
Navigate to all Packages, Search UiPath.DataServices.Activities, Click Install and Save.
You will be able to search Data Services Activities now.
Entities are available for import in Studio v2020.8 +; If you are not able to see the option on ribbon button you might need to update your studio.
- Click the Manage Entities ribbon button; Pop Window will appear like below.
- At first, you will not see any entities listed here; You need to click refresh [Icon just Below Close] to get all your entities.
- Once you see the list, You can tick them and save so that you can collect, update, and pass data to data services.
- Make sure, that if you make any changes to the entity at the level of the tenant, use the Refresh button inside the Manage Entities window before actually importing it. (So that changes gets reflected.)
The imported entities can now be used locally in your project as objects. After importing entities in your workflow, its namespace is imported as well and you can find it in the Imported Namespaces list shown below.
Explanation of Working Example
When you run the workflow and check data tab on Cloud portal, You should be able to see the created entities records.
The Query Entity Records activity can be used to pull up a list of records from the Data Service.
- You need to select Entity Type.
- Query, You can use query builder screen to make more complex search query.
- OutPut Records, This will be the list of records.
Data services can potentially store a large number of records. To query only a certain number of records, use the Pagination properties from the Query Entities Records activity.
- You will not be able to import entities when using a classic folder, make sure you are using a modern folder in your tentent.