Posts

Sample Web Chatbot design using Pega V8.3

Image
Build a Pega Intelligent Virtual Assistant™ (IVA) for Web Chatbot by adding the training tasks to the model. You can createa sample training data, map the entities, add the training data to the model, and when ready, rebuild the model. In this post we can focus on how to add several instances of same user input to train the model so that IVA for Web Chatbot improves how it responds to the text you enter, using artificial intelligence. Here are the steps to follow: 1) Create the "Insurance Quote" case type that is related to a car insurance quote. 2) Add data types for a car insurance quote such as color, make, model, registration date, VIN (vehicle identification number), and model year. 3) Make sure to instantiate a "Web Chatbot" (Eg:Web Chat) interface from Application Menu => Channels and interfaces landing page. Add the case type in the Content section with a create case command of "insurance".  Make sure to enable the Text Analyzer's ...

Kafka usecases

Image
A brief overview of Kafa platform: Apache Kafka is a streaming platform which enables users to publish data and also subscribe to different streams of records. Kafka stores the streams in a fault tolerant way. It is used to build reliable real-time streaming data pipelines. Further, it runs as a cluster and implements the concept of topics or feed name which records are published to. Kafka has great performance, and it is stable, provides reliable durability, has a flexible publish-subscribe/queue that scales well with N-number of consumer groups, has robust replication, provides Producers with tunable consistency guarantees, and it provides preserved ordering. Usecase#1: App Analytics Realtime Dashboard (AARD) Develop a scalable system which can do real-time analytics for different health applications. The occurrence of different health conditions can be regarded as the complex events and thus this concept can be extended to other use cases easily. Large number of users s...

How to find and delete the Inactive records for a particular class from a Pega application?

Image
When I was checking for something in the Report Definition rules, I got a rule: pxLoadRelevantRecordsForRecord . This report is used to pull all the active records from the system based on the context class. With this report, we can list out all the Inactive rules for our application specific class and cross check them before deletion from the system. We can build a small utility sat for example: RemoveInactiveRecords and from this activity we can call this final RD rule and pass the necessary parameters to pull the inactive list of rules instances. Once we get the list on the clipboard page, we can build the clean-up logic in the same activity or another activity to do that. The highlighted filter drives whether we need active or inactive records. Similarly, we can pass the parameter to the column: pxContextClass (Eg:Data-) from the utility by using “ Call Rule-Obj-Report-Definition.pxRetrieveReportData ”. See below for more details on how to call and pass the parameters to this R...

Pega Savable Datapages

Image
Till now we used datapages to fetch and store the data for later uses. Pega did add an extra feature: Savable Datapage ( Pega V74 and later ) which is to save the data using a datapage. We can define a data page to save data to a system of record by using save plans. By using save plans, you can save the updated information after without an activity. Reference: https://community.pega.com/sites/default/files/help_v82/procomhelpmain.htm#rule-/rule-declare-/rule-declare-pages/dm-savable-data-pages-con.htm Sample Usecase: Assume that we are getting customer details like Account Number, Address, Phone Number etc., from an external database. User has the ability to change the address/phone#. Once the user updates any of the details, we need to update the external database. Without Savable datapage: We use a datapage to store the customer details to avoid multiple calls for the same data (if needed multiple times). Whenever the details are changed we use an activity logic to sen...

Create a Case using Pega Microservice code from an external system

Image
Microservices are a software development technique—a variant of the service-oriented architecture (SOA) architectural style that structures an application as a collection of loosely coupled services.The benefit of decomposing an application into different smaller services is that it improves modularity. This makes the application easier to understand, develop, test, and become more resilient to architecture erosion. In a microservices architecture, services are fine-grained and the protocols are lightweight. For more details, check the internet. This is a simple exercise to run a sample Pega microservice code using postman API testing tool (3rd party to run REST api-services). To run this exercise, we need to have a local Pega PE running and the PE would need a sample application running with a Case type and all. Before running the Pega PE, make sure to have postman tool running in the machine. To download the postman tool, follow this site: https://www.getpostman.com/. Chec...

Generate QR code from Pega

Image
This is a small experiment on how to generate a QR code using Pega. For this, we need a Zebra Crossing library(jar) to import into Pega and use those classes to create a QR code image (png) from Pega. It is available from the Maven repository   given below (just use a browser to download it) and use the Import feature from Pega.    https://repo1.maven.org/maven2/com/google/zxing/core/2.2/core-2.2.jar The main steps we need to follow in Pega to work on this exercise: 1) Build a Pega function (RUF):  GenerateQRCode   with the java code to generate the QR code image. This RUF needs few parameters like file type, text to use, width & height of the images. 2) Build another Pega function (RUF):  GetFileName with the java code to get the random file name using SHA1 checksum of the image. 3) Build the logic in the activity:  GenerateQRCode by using the above 2 steps and render the QR image in a HTML screen popup using Show-HTML from the activit...

My Kafka Learning

Image
Though I am not an expert in Kafka but I am giving some of my learning points as a part of my Kafka integration exercise with Pega Infinity. To begin with Kafka, I was curious to know how it works and what are all the various components to understand well along with Kafka cluster architecture. We can get any Kafka related information from Google and I am trying to cover the fundamentals/basics & the importance of Kafka in my words. For any extra information related to Kafka, it is good to refer the books or we can do some research in net. Kafka is a distributed publish-subscribe messaging system that is designed to be fast, scalable and durable. It was developed by LinkedIn and open sourced in the year 2011. It makes an extremely desirable option for data integration with the increasing complexity in real time data processing challenges. It is great solution for applications that require large scale message processing. The main component of Kafka are: 1.   ...