Discussion
Pegasystems Inc.
JP
Last activity: 17 Mar 2022 11:00 EDT
How to connect to WinDirector
Hi,
Pega Platform is capable of integrating with third-party RPA software. Our recommendation is always to use Pega Robotics, as we provide an out-of-the-box control tower called "Robot Manager" that manages your robots without any additional implementation. However, if customers already have other vendor’s robots in place, or there are any specific reasons to use non-Pega RPA solution, that is okay, we can still leverage it by integration. In my personal experiences over the last couple of years, top two most popular RPA software I worked on are UiPath and WinActor, both of which are the market leaders in Japan.
WinActor also has management software called "WinDirector" which offers similar functionality as Pega Robot Manager. WinDirector provides REST API to be used by third-party platforms to build connectors/adapters. With Pega Platform, you can easily build REST Connectors and invoke or retrieve information about a WinDirector resource from within your Pega application (e.g. start jobs or create queue items which can be processed by robots, etc). The specifications of APIs are not disclosed over the Internet or Swagger, and you will have to contact NTT DATA Corporation, the manufacturer of WinActor / WinDirector.
In this post, I am sharing how to build WinDirector Connectors in Pega 7.4. I’ve prepared four PCs locally as below diagram. The scenario I came up with in this PoC is as follows:
User enters two values, X and Y for input arguments from screen and submits (PC #2). This is Pega’s flow action. Then Pega Platform advances a flow and reaches "Call RPA" shape (PC #1). Connect REST gets invoked and initiates communication with WinDirector (PC #3). WinDirector starts job and input arguments (X and Y) are passed to WinActor robot (PC #4). WinActor robot opens Excel and calculate X plus Y. Robot figures the result on Excel and job is completed. The result file is created and transferred to WinDirector’s file system. Job status is also updated on the job table in WinDirector. As of 2019, WinDirector does not have Webhook functionality and it can’t proactively push the result back to Pega Platform from their side. Hence in this PoC, I have configured Pega Platform to reach out to WinDirector by Connect REST again, to obtain the result. Also, WinDirector doesn’t have an API that returns the result by text (JSON) and the result is returned only by zip binary file (Content-Type: multipart/form-data). This is an unusual specification, and I developed a Java code to handle this. Finally, Pega Platform opens the work object and attaches the result zip file to the case.
Please see attached file for the detailed steps to perform this task. Since WinDirector’s APIs are not fully REST-compliant, you may face miscellaneous issues during implementation. For example, all of WinDirector endpoint URLs contain a trailing slash (ex. …/restapi/jobs/). This is not a good practice, and Pega REST Connector wizard will fail. I have documented how to avoid such errors. The following contents are included (sorry, but document is all written in Japanese).
(1) How to build calculation program by WinActor
(2) How to call REST APIs from WinDirector
(3) How to call REST APIs from Postman
(4) How to call REST APIs from Pega Platform via WinDirector (Connect REST)
(5) How to attach a zip file received from WinDirector (Content-Type: multipart/form-data)
(6) WinDirector REST API specifications
* I've also posted a little higher-level article as to where to put the effort, either BPM or RPA. I would suggest you go through https://collaborate.pega.com/discussion/bpm-vs-rpa, if you haven't.
Hope this helps.
Thanks,