Attended automation architecture and design
Desktop automations are designed and built in Pega Robot Studio. The automations then run in Robot Runtime on the local desktop.
Automations are invoked from the Pega client by using Pega's Messaging Service, which is based on WebSocket connections. WebSocket connections are long-lived, duplex connections that do not require SSL certificates. After receiving an invocation request, Robot Runtime is responsible for starting the automation, performing the automation logic, and returning an appropriate response from your automation to the Pega Platform.
Security
In the Messaging Service, the JSON Web Tokens (JWT) and the data to be published are validated to ensure secure WebSocket connections and trustworthy browser calls.
When the WebSocket connection is being created for the browser, the JWT issued by Infinity to the user during their login is validated with the JWKset file issued by Infinity directly to the Constellation Message Broker. The WebSocket connection is created only if this validation is successful.
For more information, see Messaging Service Architectural Overview.
Enabling the Messaging Service
To enable Pega's Messaging Service for use in attended automations, use the following steps:
- Enable Web Sockets on the Pega platform by setting up the Constellation UI Service. For more information, see Setting up the Constellation UI Service in Pega Platform.
- Enable Robot Runtime to use Web Sockets by setting the
UseMessagingService setting in the
PlatformInvocation section of the
PegaRuntimeConfig.Xml
to True.
For more information about the PegaRuntimeConfig.xml
file, see Configuring Pega Robotic Automation.
Design principles
Automations are executed synchronously. This means that your automation waits for a step or task to be completed before proceeding to the next step in the flow. For this reason, you should design automations that are relatively short and fast, and have a single focus or purpose. As a best practice, break down larger blocks of functionality into smaller automations to avoid the appearance of an unresponsive or slow application.
Automations can take input such as a customer name and account number, and return output, such as the amount of a transaction. Configuring data input and output is discussed in detail below. At this time, only scalar Pega Platform properties can be passed between your Pega Platform application and an automation. Hierarchical structures and lists of data are not yet supported.
When designing an automation, you must coordinate the following items between Pega Platform Dev Studio and Pega Robot Studio development environments:
- The automation identifier that is created in Robot Studio and uniquely identifies your automation
- The fully qualified class name of the case that will be invoking the automation (for example, MyOrg-MyApp-Work-OpenTicket)
- The format of the data as it is received by the automation
- The required format of any data that is returned from an automation to your Pega 8 application
- Calling automations from Pega Platform
You can invoke automations from any flow action that runs as part of a standard flow, modal dialog box, or overlay.
Previous topic Configuration of attended automations to use with Pega Platform Next topic Calling automations from Pega Platform