Posts

Create a zip file with multiple files in Pega V851 and is password protected too

Image
  One of my friends came with a requirement like- Is there anyway we can create a zip file with multiple files from Pega? Also, he asked me to protect the final zip file after finishing the process .After digging a bit in the net, I got an opensource (zip4j) since we don't find a direct OOTB feature for this usecase. This opensource was built by Srikanth Lingala and is based on pure java. There might be other opensources to create a zip file in the market but this one provides security on the final zip file. This opensource comes with a single jar file to import in Pega to get all necessary files to work on this exercise. Here is the link to download the jar file:  https://jar-download.com/artifacts/net.lingala.zip4j/zip4j/1.3.2/source-code   As usual, I created a simple Pega function with the java code by importing the necessary packages in the library rule. Called this Pega function from a Data Transform and tried with 2 files and created a pwd protected zip file after ...

Easy to install Pega Customer Decision Hub(CDH) in Pega Infinity V851 PE

Image
Before we install, let's get a high level idea on Pega Customer Decision Hub. Customer Decision Hub is a solution that combines data management, decision management, and advanced analytics across multiple channels. CDH is fully integrated with Pega Platform and can utilize many of its features to ensure that decision-making in your application is always driven according to the Next-Best-Action principle. You can use Pega Platform to build your own decision-making hub that quickly and accurately provides the most relevant value-added decisions. Customer Decision Hub comes as part of Pega Marketing by default. CDH can also be added to Pega Strategic Applications, such as Pega Customer Service or Pega Sales and Onboarding. For more details, visit Pega Community site. It is very easy to install Pega CDH in Pega Infinity running on V851 PE provided we should have that CDH8.5 software with us. The key for this installation is to get the CDH packages, DB scripts etc before we start impl...

Enable/Disable the REST API service specific loggers in Pega

Image
There may be an instance where we need to capture the errs/issues while working on REST conn/service. We know that Pega gave OOTB loggers to enable/disable in the Designer Studio (Pega 7.x) or Admin Studio (Pega 8.x). The below 4 loggers are required in REST side. Enable them in the sys based on the needed level (Err/Debug/All/Warn/Alert/ Fatal). Below are sample screenshots to understand on how we can set them in both Pega V7 and V8.   Logger Names:   com.pega.pegarules. integration.engine.internal. util.PRServiceUtils (Any Service) com.pega.pegarules. integration.engine.internal. ServiceMappingUtils (Any Service) com.pega.pegarules. integration.engine.internal. connect.rest.RESTClient (REST Connect) com.pega.pegarules. integration.engine.internal. connect.rest.RESTConnector ( REST Connect)   When we associate a log level with a log category, the log messages of this category are written to a log file. The log level applies to all the loggers that we are associate with t...

Manage Pega V851 API's via Open API Gateway (WSO2)

Image
In this post, let us focus on how Pega API's can be managed via any Open API Gateway like WSO2. To work on this exercise, we need the below prerequisites. 1) Create a Service-REST API in Pega [Eg: Create a HR Service case in this context] 2) SwaggerHub tool to import the API's YAML data from the above step 3) WSO2 tool to publish and invoke the above API service Create a Service-REST API: Follow the below simple steps from Pega using Service-REST Capture the YAML data from the above created service and update the server URL with tunneled URL generated by using ngrok.exe [Eg: run the command "ngrok http 8082" from command line prompt] Copy/mark the https URL from command line prompt and update the YAML file in the editor shown in below video. SwaggerHub tool editor to import the API's YAML data:  A brief idea on this tool before we start using this Opensource at our end. Swagger is a set of rules (in other words, a specification) for a format describing REST API...

Easy to create CSS login screens using Pega PE V851

 We all know that we have OOTB login screen given by Pega and is built on CSS and HTML. But the login screen in OOTB is a static screen and is not a flash/animated gif screen where we have the rich look & feel. Pega won't stop us to leverage these animated login screens in the system. To implement a animated login screen, we need the custom CSS and JS files to update the Pega rules in a specific ruleset version accordingly. The main HTML rule: @baseclass.Web-Login in Pega is used to create the login screen. There is a OOTB rule: py-login-screen where it has the CSS specifications to use in the login form.  To begin on this exercise, first you need to have a dedicated ruleset for making the changes. I am giving my old post link where you have all the steps mentioned to create a ruleset in this context. Here is the link to follow before we start this PoC.  http://pisupativenkatasesha.blogspot.com/2020/12/how-to-change-pega-login-screen-with.html  First of all, we...

Validate Credit Card from Pega UI using Luhn algorithm

Image
Not sure on how many folks know about Luhn  algorithm to validate the CC number using java/javascript logic. Most credit cards and many government identification numbers use this algorithm as a simple method of distinguishing valid numbers from mistyped or otherwise incorrect numbers. Recently I gave a simple solution to one of my friends on validating the CC number using this algorithm. Here is the idea on how I have provided the solution for him. There are mainly 3 steps we need to follow while building the logic in the Pega function to be called from the UI text field. To know more about this algorithm, google it and you can get more info. Not sure if there is any other better option to validate CC's. I am also not sure whether we have any OOTB feature given by Pega on this validation.  Here are the steps to be followed in Pega: 1) Create a Pega function with java logic to validate the CC by passing the CC number as a parameter 2) Add a sample text field on the UI and have ...

How to change the Pega login screen with custom logo and background?

Image
It is very easy to change the Pega login screen with your custom logo an the background. Here are the simple steps to follow. 1) Create a ruleset: Unauthenticated under version:01-01-01 and make it for checkout the code. Make sure to add this ruleset in the application rule's stack 2) Create an access group =>  Acme:Unautenticated and point your application with a role: PegaRULES:Guest . Set the workpool to the work class and set the Production Ruleset to Unauthenticated 3) Edit the Requestor Type: Browser(pega) by adding the access group => Acme:Unautenticated  and make it selected as default access group 4) Download any custom logo an the background image files from google images. In my case, Acmelogo.png and AcmeBkgrnd.jpg 5) Upload both these files into Pega using Records -> Technical -> Binary File. Make sure to use the App Name(Directory) as webwb under the ruleset: Unauthenticated accordingly 6) Now it is the time to update the login screen specific...