Posted: 12 Oct 2018 16:45 EDT 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!
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
8.0 SP1 2007
Excel File Connector
In addition, we will be happy to include discussions concerning StringUtils, DateTimeUtils and TimeSpanUtils.
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:
"name": "id labore ex et quam laborum",
"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.
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.
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.
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.
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.
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.
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.
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 & 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.