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!

Group Tags


Keep up to date on this post and subscribe to comments

October 15, 2018 - 8:13am

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:


Build Released In









OCR Screen Scraping


Extended UI Automation


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. 

October 15, 2018 - 8:34am

October 15, 2018 - 10:27am

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:

  1. {
  2. "postId": 1,
  3. "id": 1,
  4. "name": "id labore ex et quam laborum",
  5. "email": "Eliseo@gardner.biz",
  6. "body": "laudantium enim quasi est quidem magnam voluptate ipsam eos\ntempora quo necessitatibus\ndolor quam autem quasi\nreiciendis et nam sapiente accusantium"
  7. }

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:

  1. public class Comment
  2. {
  3. public string postId { get; set; }
  4. public string id { get; set; }
  5. public string name { get; set; }
  6. public string email { get; set; }
  7. public string body { get; set; }
  8. }

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!

October 15, 2018 - 11:07am

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.

October 15, 2018 - 11:26am
Response to Grigory Petrov

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.

October 15, 2018 - 11:22am

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.

October 16, 2018 - 7:36am
Response to jeffbadger

Thank you, Jeff! It works!

October 16, 2018 - 2:57pm

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.

October 16, 2018 - 5:35pm


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.

October 16, 2018 - 5:41pm
Response to Pavel Balakshin

Yes. SP1 releases after 2006 include all of the features above (some were added in the 2007 release).

October 16, 2018 - 6:07pm

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.

October 17, 2018 - 1:28pm

October 22, 2018 - 2:37am

Can you please provide guidelines on OCR - how to use FineReader and then OCR component in Pega Robotics Studio.


October 22, 2018 - 9:46am
Response to jayachandrar2495

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.

October 22, 2018 - 4:38am

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?


October 22, 2018 - 9:37am
Response to MuruganH

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.

October 22, 2018 - 9:53am
Response to jeffbadger

Sure. Thanks, Jeff.

October 22, 2018 - 11:58pm

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.

October 23, 2018 - 3:58am

Hi Jeff,

Can you please provide an working example for the REST Client ?

October 23, 2018 - 12:54pm

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.



October 26, 2018 - 4:56pm

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!

Marissa | Community Moderator | Pegasystems Inc.