Discussion
Pegasystems Inc.
US
Last activity: 26 Oct 2018 16:57 EDT
Ask the Expert - Robotics with Jeff Badger and Thomas Sasnett
Please Join Jeff and Thomas for this exciting session!
Meet Jeff and Thomas:
Jeff (@jeffbadger) is a Product Manager for Robotics and Thomas (@tsasnett) is a Lead System Architect for Robotics and Workforce Intelligence. Both have been designing and developing robotic automation projects for over 13 years using the Pega Robotics Studio and its predecessor products. They have worked with clients in varying industries, including Financial Services, Insurance, Telecommunications, Collections and Call Centers.
Message from Jeff and Thomas:
We are excited to discuss with you our new components and the other utility components that are available in the Robotics product!
Ask the Expert Rules:
- Follow the Product Support Community's Community Rules of Engagement
- This is not a Live Chat - Our SMEs will reply to your questions over the course of this two-week event
- Questions should be clearly and succinctly expressed
- Questions should be of interest to many others in the audience
- Have fun!
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
Since the beginning of 2018 there has been an extensive list of new functionality added to the Pega Robotics product. Adoption of new functionality is an integral part of product development. As such, we will discuss this exciting new functionality in the product to create better awareness and stimulate adoption. This “Ask The Expert” session is intended to answer questions, discuss use cases and to share your experiences with this new functionality . Here is a list of the new functionality for this discussion:
Component/Functionality |
Build Released In |
FileUtils |
8.0.1078 |
RestClient |
8.0.1086 |
RobotManagerRestClient |
8.0.1086 |
JsonUtils |
8.0.1086 |
OCR Screen Scraping |
8.0.1087 |
Since the beginning of 2018 there has been an extensive list of new functionality added to the Pega Robotics product. Adoption of new functionality is an integral part of product development. As such, we will discuss this exciting new functionality in the product to create better awareness and stimulate adoption. This “Ask The Expert” session is intended to answer questions, discuss use cases and to share your experiences with this new functionality . Here is a list of the new functionality for this discussion:
Component/Functionality |
Build Released In |
FileUtils |
8.0.1078 |
RestClient |
8.0.1086 |
RobotManagerRestClient |
8.0.1086 |
JsonUtils |
8.0.1086 |
OCR Screen Scraping |
8.0.1087 |
Extended UI Automation |
8.0.1087 |
Document OCR |
8.0 SP1 2007 |
Excel File Connector |
8.0.SP1 2007 |
In addition, we will be happy to include discussions concerning StringUtils, DateTimeUtils and TimeSpanUtils.
-
Yuxing Sun
Accenture
DE
This comment/reply has been branched into a new post
-
alphonse vivanloc
Pegasystems Inc.
US
Good morning!
I'd like to know if it is possible to work with complex JSON objects using JsonUtils. I know developer can set keys in component properties and use GetValueFromJSON or GetValueFromJSONByKeys. It works perfectly with simple key-value structure like this one:
{
"postId": 1,
"id": 1,
"name": "id labore ex et quam laborum",
"email": "[email protected]",
"body": "laudantium enim quasi est quidem magnam voluptate ipsam eos\ntempora quo necessitatibus\ndolor quam autem quasi\nreiciendis et nam sapiente accusantium"
}
There are also DeserializeObject(...) methods where I can provide object type. However, it doesn't seem easy to work with custom types there.
Example: here is test JSON response which is JSON array containing multiple objects as above: https://jsonplaceholder.typicode.com/comments?postId=1
In C# I would add custom type:
public class Comment
{
public string postId { get; set; }
public string id { get; set; }
public string name { get; set; }
public string email { get; set; }
public string body { get; set; }
}
and then deserialized like this (using Newtonsoft.Json;):
Good morning!
I'd like to know if it is possible to work with complex JSON objects using JsonUtils. I know developer can set keys in component properties and use GetValueFromJSON or GetValueFromJSONByKeys. It works perfectly with simple key-value structure like this one:
{
"postId": 1,
"id": 1,
"name": "id labore ex et quam laborum",
"email": "[email protected]",
"body": "laudantium enim quasi est quidem magnam voluptate ipsam eos\ntempora quo necessitatibus\ndolor quam autem quasi\nreiciendis et nam sapiente accusantium"
}
There are also DeserializeObject(...) methods where I can provide object type. However, it doesn't seem easy to work with custom types there.
Example: here is test JSON response which is JSON array containing multiple objects as above: https://jsonplaceholder.typicode.com/comments?postId=1
In C# I would add custom type:
public class Comment
{
public string postId { get; set; }
public string id { get; set; }
public string name { get; set; }
public string email { get; set; }
public string body { get; set; }
}
and then deserialized like this (using Newtonsoft.Json;):
List<Comment> comments = JsonConvert.DeserializeObject<List<Comment>>(jsonString);
Could you show how would you do this with JsonUtils?
Thank you!
Pegasystems Inc.
US
Hi, Jeff and Thomas - I see there is detailed documentation for RobotManagerRestClient (http://help.openspan.com/80/Components/Robot_Manager_REST_Client.htm), but as a business architect I am not clear from the technical detail what kind of use cases this component can add value to outside of built-in communications between runtime and Robot Manager that don't require any additional configuration of the component. Thank you.
Pegasystems Inc.
US
The RobotManagerRestClient was created specifically to provide a way to communicate with the Pega Platform using the credentials that the Runtime uses to register with the Robot Manager. We have used the component on projects to call web services we provisioned in the Pega Platform to provide access to Decision Trees and Decision Tables, which allowed us to move some complex decisioning from the Robot to the Pega Platform.
Pegasystems Inc.
US
Complex json may be converted using JsonUtils to many different formats. Converting to generic types such as List<string> is not currently supported. There are other alternatives that will give you the same result, however. In this case I would create a LookupTable that used "id" as the key and had a column for each of your other properties.
You can then use JsonUtils.DeserializeObject to create a data table from your json like this and store the result in your lookup table. From there you would do normal processing.
Complex json may be converted using JsonUtils to many different formats. Converting to generic types such as List<string> is not currently supported. There are other alternatives that will give you the same result, however. In this case I would create a LookupTable that used "id" as the key and had a column for each of your other properties.
You can then use JsonUtils.DeserializeObject to create a data table from your json like this and store the result in your lookup table. From there you would do normal processing.
I have attached a sample solution that contains all of this code. In addition this sample shows how to return the lookup table as json after you have modified it.
Pegasystems Inc.
US
Thank you, Jeff! It works!
-
sonilata jena Tista Paul Chowdhury
Pegasystems Inc.
US
The FileUtils component was released in build 8.0.1078. It makes it easier to do basic file operations that are available through the File, Directory and Path objects in System.IO.
Here are the methods available:
One use case that I use often is to load a lookup table from a file that is included in the deployment package. To generate the file I load the table using a simple interface and then use the DataTable.WriteXml method to save it to disk.
The FileUtils component was released in build 8.0.1078. It makes it easier to do basic file operations that are available through the File, Directory and Path objects in System.IO.
Here are the methods available:
One use case that I use often is to load a lookup table from a file that is included in the deployment package. To generate the file I load the table using a simple interface and then use the DataTable.WriteXml method to save it to disk.
I then include the file in my solution. When the solution starts I get a proxy for the data table, then find where the file is located on the disk using FileUtils and finally load the lookup table.
-
Vipin Keshri
Pegasystems Inc.
US
Hello,
Most of the components became available since the 8.0.x branch, while part of them (OCR, Excel) released in 8.0.SP1. Does SP1 include all features that are presented in the table above? Thanks.
-
Imranullah DawoodBasha
Updated: 16 Oct 2018 17:40 EDT
Pegasystems Inc.
US
Yes. SP1 releases after 2006 include all of the features above (some were added in the 2007 release).
Pegasystems Inc.
US
The Excel File Connector is new in Pega Robotics version 8.0 SP1_2007. It is a connector that allows interaction with Excel without requiring Excel to be installed. This is most useful for RPA projects where you might not want to install Office or where you want to automate some Excel tasks without showing the file to a user. It is faster than the traditional Excel connector, however it doesn’t visually open the file, so you cannot watch what is happening. There are many methods available on the connector. You’ll also see similar ones added to the current connector in an upcoming release.
The attached solution showcases some common usage of the DateTimeUtils (to get today’s date and format it), the StringUtils (for checking whether or not a string is null or empty), and the FileUtils (to check to see if a file exists). It is essentially using an Excel file to store a list of orders processed for the day.
In the solution, you will first select a directory to store the file by clicking the “Select File Location” button. Next, you’ll need to click “Create File” which will create a new file in that directory appended with today’s date. If that file exists, it will read it and place it into a Lookup Table.
Next, you will need to add at least one record into the table. You can enter anything into the text box as the only validation is that it is not blank and then click the “Add Order to Table” button.
The Excel File Connector is new in Pega Robotics version 8.0 SP1_2007. It is a connector that allows interaction with Excel without requiring Excel to be installed. This is most useful for RPA projects where you might not want to install Office or where you want to automate some Excel tasks without showing the file to a user. It is faster than the traditional Excel connector, however it doesn’t visually open the file, so you cannot watch what is happening. There are many methods available on the connector. You’ll also see similar ones added to the current connector in an upcoming release.
The attached solution showcases some common usage of the DateTimeUtils (to get today’s date and format it), the StringUtils (for checking whether or not a string is null or empty), and the FileUtils (to check to see if a file exists). It is essentially using an Excel file to store a list of orders processed for the day.
In the solution, you will first select a directory to store the file by clicking the “Select File Location” button. Next, you’ll need to click “Create File” which will create a new file in that directory appended with today’s date. If that file exists, it will read it and place it into a Lookup Table.
Next, you will need to add at least one record into the table. You can enter anything into the text box as the only validation is that it is not blank and then click the “Add Order to Table” button.
Finally, you may click the “Write Table to File” button to take the contents of the Lookup Table (visually shown on the Data Grid View) and write them to the Excel file.
The main automations to note are in the “Procedures” folder; Excel_P_CreateFile and Excel_P_WriteToFile.
Excel_P_CreateFile shows you have you might use the connector to create a file and read its contents into a Lookup Table. In addition, you can see usage of the DateTimeUtils to generate today’s date and format it. You can also see usage of the FileUtils described in more details by Jeff above to combine file paths (which is helpful in case you are unsure of whether they end with or start with a backslash).
Excel_P_WriteToFile will simply get the table from the Lookup Table and use the ImportFromTable method to write the contents to the file.
Infosys
IN
Can you please provide guidelines on OCR - how to use FineReader and then OCR component in Pega Robotics Studio.
Pegasystems Inc.
US
There are 2 types of OCR available - ScreenOCR and DocumentOCR. ScreenOCR is used for true screen scraping (when injection is not possible) and should only be used for RPA applications. DocumentOCR is used for turning printed documents into either PDFs or Text files. FineReader is used by these components but that is transparent to you as the developer.
Here is a link to the Screen OCR documentation as well and there is in addition a Pega Academy course that deals with Screen OCR. You should start there.
DocumentOCR was released in 8.0 SP1. The documentation can be found in Help.
Standard Chartered Global Business Services
IN
Hi Jeff / Thomas,
Could you please share some sample solutions, documents, references, if possible, on each of the functionalities like RestClient, JsonUtils, Extended UI Automation, Document OCR, Excel File Connector, OCR Screen Scraping, etc., since these are ones added recently to Robotics product, and that we could also get a better understanding of in which scenarios these could be used.
On another note, we are planning to upgrade OpenSpan (currently we use 7.1.63). Could you please suggest whether to upgrade to latest version of 8.0 (8.0.1106 or any higher) or to go with 8.0 SP1 version? From one of the other threads, I understand that new functionalities would be added only to SP1 and only maintenance fixes will be added to 8.0.x. Is my understanding correct?
Thanks
Murugan
-
Nilesh Bhor
Pegasystems Inc.
US
You should move to 8.0 SP1. This is where new features are being added.
Documentation on all of the new functionality can be found in the online Help. If you would like some specific code examples - please request them with a use case.
Standard Chartered Global Business Services
IN
Sure. Thanks, Jeff.
JPMorganChase
IN
Hi Jeff and Thomas,
Thanks & Congratulations for all the nice features added in 8.0 + version.
I want to draw your attention towards the limited and obsolete information available on PDN about using RPA. I started doing a POC using OpenSpan studio and PEGA. But I was not able to make register my RPA VM on PEGA application, even I follow the steps mentioned in various PDN articles, finally it turned out to be RobotManager5 and OpenSpan 8.0 version compatibility issue.
If there are some more Show & Tell features videos (latest) and articles how to use it , will definitely help customers and partners.
Cognizant Technology Solutions India PVT Ltd
IN
Hi Jeff,
Can you please provide an working example for the REST Client ?
-
Nicholas Klegin GINEVA TENDOY
Pegasystems Inc.
US
Here is a sample using the RESTClient and JsonUtils. This may not be the best example of a REST call - I will keep looking for a better example.
Check out the automation graphics listed below.
-
Harsh Bodhi Christin Varughese Anuj Parashar Ray Bernoff Andrew Kerschinske and 1 More
Pegasystems Inc.
US
Thank you for checking out this Ask the Expert session on Robotics with @jeffbadger and @tsasnett!
Thanks to our Experts for sharing their knowledge and time with us!