Previous Business Date With Australia Day Light saving Logic

 
This post contains logic related to find the previous business day using the Data transform based on the calendar which is passed .




Extracted Table

#ActionTargetRelationSource
1SetParam.DateAESTequal to@DateTime.FormatDateTime(@DateTime.addToDate(@CurrentDateTime(),'0','0','0','0','0','0'),'yyyyMMdd','Australia/Sydney','en_AU')
2SetParam.PreviousBusinessDayAESTequal to@addDays(Param.DateAEST,-1,true,'AUDefault')
3SetParam.DateGMTequal to@CurrentDate('yyyyMMdd','GMT')
4SetParam.PreviousBusinessDayGMTequal to@addDays(Param.DateGMT,-1,true,'AUDefault')
5SetParam.DaylightSavingequal to@InDaylightSaving('Australia/NSW',@CurrentDateTime())
6When@CompareDates(Param.DateAEST,Param.DateGMT)
6.1When@equalsIgnoreCase(Param.DaylightSaving,true)
6.1.1Setparam.StartDateequal to@addToDate(Param.DateGMT,'',13,'','')
6.1.2SetParam.PreviousBusinessDayStartDateequal to@addToDate(Param.PreviousBusinessDayGMT,'',13,'','')
6.1.3SetParam.PreviousBusinessDayEndDateequal to@DateTime.addToDate(param.PreviousBusinessDayStartDate,'1','','','')
6.1.4SetParam.PreviousDayequal to@DateTime.addToDate(param.StartDate,'-1','','','')
6.1.5SetParam.CutOffDateequal to@DateTime.addToDate(param.StartDate,'','','','')
6.2Otherwise
6.2.1Setparam.StartDateequal to@addToDate(Param.DateGMT,'',14,'','')
6.2.2SetParam.PreviousBusinessDayStartDateequal to@addToDate(Param.PreviousBusinessDayGMT,'',14,'','')
6.2.3SetParam.PreviousBusinessDayEndDateequal to@DateTime.addToDate(param.PreviousBusinessDayStartDate,'1','','','')
6.2.4SetParam.PreviousDayequal to@DateTime.addToDate(param.StartDate,'-1','','','')
6.2.5SetParam.CutOffDateequal to@DateTime.addToDate(param.StartDate,'','','','')
7When@equalsIgnoreCase(Param.DateAEST,Param.DateGMT)
7.1When@equalsIgnoreCase(Param.DaylightSaving,true)
7.1.1Setparam.StartDateequal to@addToDate(Param.DateGMT,'',11,'','')
7.1.2SetParam.PreviousBusinessDayStartDateequal to@addToDate(Param.PreviousBusinessDayGMT,'',11,'','')
7.1.3SetParam.PreviousBusinessDayEndDateequal to@DateTime.addToDate(param.PreviousBusinessDayStartDate,'1','','','')
7.1.4SetParam.PreviousDayequal to@DateTime.addToDate(param.StartDate,'-1','','','')
7.1.5SetParam.CutOffDateequal to@DateTime.addToDate(param.StartDate,'','','','')
7.2Otherwise
7.2.1Setparam.StartDateequal to@addToDate(Param.DateGMT,'',10,'','')
7.2.2SetParam.PreviousBusinessDayStartDateequal to@addToDate(Param.PreviousBusinessDayGMT,'',10,'','')
7.2.3SetParam.PreviousBusinessDayEndDateequal to@DateTime.addToDate(param.PreviousBusinessDayStartDate,'1','','','')
7.2.4SetParam.PreviousDayequal to@DateTime.addToDate(param.StartDate,'-1','','','')
7.2.5SetParam.CutOffDateequal to@DateTime.addToDate(param.StartDate,'','','','')

Generic Email Decision Table and Activity

 This Post talks about how to create a Generic Email Decision table which can be used across appliation to configure the Email parameters like To , CC , Subject and Body.

Lets Create a Decision table , SendEmailByPurpose


Input columns in Decision table 

pyPurpose -> Identifier for sending which email 

Evaluate -> @equals ("true" , current-value)


Output Columns

Mapping data transform -> pyDataTransform 

Correspondance -> pyCorrForSendEmail

Subject ->pySubject 

To - pyTo   

CC - EmailString








Constellation Architecture

 Constellation Architecture


Pega 8.8 version

if alternate design system



Make the Right Decision


Create New Application using Constellation

Select Cosmos React

Get My Visa Application Name


Check the application stack


Preview the application for error message


Why Pega is using Constellation ?

 So why Pega is using Constellation ?


Configuration over customization
User Friendly Javascript Rendering 
Decopuled server(s) for UI codebase
Less Maintenance and smooth upgrade


Understanding of Kafka

What is Kafka ?

Distributed Streaming platform

Think of it as:
👉 Producers (send messages) → Kafka Broker (stores/distributes them in Topics) → Consumers (read messages).


Core Concepts

  1. Broker – A Kafka server that stores and serves messages.

  2. Topic – A logical category to which messages are published (like a folder).

  3. Partition – A topic is split into partitions for scalability. Each partition is an ordered sequence of messages.

  4. Producer – Application that sends messages to a topic.

  5. Consumer – Application that reads messages from a topic.

  6. Consumer Group – A group of consumers that share the load of reading messages from partitions.



To Understand what value is there in the partition.

Install KafkaTool and provide the details from tomcat\kafka-1.1.0.8\config\server.config -> listeners line

ClusterName - Kafka-1.1.0.8
Kafka Cluster Version - 1.1
ZookeperHost -> 192.168.4.21
ZookeperPort -> 9092
ChrootPath - > /



I have created a QP - ABCDEF which i can see it has created 6 partitions (0-6)
Each Partitions has Offset from start 0


Now simply queue three items to QP
The Queue items are exeuted and can see the partitions selected  1, 2, 3 and each ran once



Timer Control

Multi Timer

Go and Play Timer

Pending Constellation

 

  1. Flexible UI with Constellation - https://community.pega.com/blog/flexible-ui-constellation - Kamil Janeczek
  2. Prescribed and flexible UI with Constellation - https://community.pega.com/blog/prescribed-and-flexible-ui-constellation - Kamil Janeczek
  3. How Constellation works - from authoring to rendering - https://community.pega.com/blog/how-constellation-works-authoring-rendering - Piotr Jurkowski

Constellation hands on L4

 

Constellation Building Blocks

Constellation Architecture is made of several building blocks, which work together in harmony to help you crush complexity.

Client device

In traditional Pega UI, server does both the business logic and generating all of the UI markup
But in constellation , user browsers and devices to do the heavy lifting, by utilizing the Constellation orchestration layer.

the client device plays active and vital role, acting as the layer -This includes transforming JSON metadata into HTML code

server load is minimized, creating an even faster and more responsive user experience

Infinity server and DX API

In the Constellation architecture, the Pega Infinity Server acted as a brain holding the business rules, logic, and data, while the orchestration and presentation were handled by the user's device.

Communication between both sides is covered by the use of DX API [case data + UI metadata]

Constellation UI services

 UI-related tasks are separated into two separate services
App-static - a client application-specific UI static content delivery service
UI assets (images, custom components, localizations) authored by clients are application-specific
cloud-based multitenant service or as a deployable service known as the App-Static service
must be safely stored and protected

requires authentication for all APIs (for both read and write). Reading or writing of customer-generated content is covered by the signed token

PEGA CDNConstellation Pega UI static content
JavaScripts generated by Pega and that are part of Pega Platform
The same service for all clients
can be made publicly available for quick access
read-only and does not require authorization

Messaging Service

the Messaging Service, which realizes a server-to-client push architectural component of Constellation

components-to-topics subscriptions made through the WebSocket connection

Infinity publishes data --> Message Broker through an HTTP REST connection.
The Message Broker then pushes --> browsers that registered

for example, charts that update in real-time, or a bell icon with a badge

Greater than the sum of its parts

The orchestration layer, the Infinity server, and the robust Messaging Service collectively deliver a faster, more responsive, and highly scalable user experience

Constellation hands-on L3

 Learings from Characteristics of Constellation Architecture

The Constellation UI employs a Center-out™ approach. It is API-first, built on a model-view-controller (MVC) architectural framework and interacts with users through a prescribed UI in a stateless manner.

 Model-view-controller (MVC)




  • The model is responsible for modeling data and business logic.
  • The view manages the presentation layer and user interactions.
  • The controller is the connection between the model and the view, and handles user inputs which it translates into appropriate actions in the model.

model - Pega Platform and its data, business logic, and workflow
view - Constellation design system front-end User Experience
controller -architecture orchestration layer is the Controller which conencts model to channel using API - Digital Experience (DX) API.


Microservices

Designing software applications as a collection of small, self-contained, and autonomous services

 The design of each service is small and responsible for a single specific end-to-end business function . They operate independently of each other and through well-defined interfaces

limits the impact of changes in one service on the overall system.
each service can be scaled individually based on demand

Stateless architecture

Each interaction (request) between client and server occurs as a separate transaction
Server does not maintain any state information about the previous interactions

Constellation architecture shifts towards stateless architecture, which results in ending requestor sessions and releasing the Pega Clipboard after each DX API call.

Client orchestration
generation of the UI and orchestration of UI components from the server to the client side

All the modules responsible for generating UI and orchestrating actions are in client and communicates with the server only to exchange information

User interface rendering are carried out fully on the client device by the Constellation design system

Prescribed UI

Ensures consistency across different parts of an application, or multiple applications within the same ecosystem.

all of the elements are built from the same library of prescribed components

Modular architecture

Designing software around smaller, reusable modules - each module houses a specific functionality and provides an interface to interact with it

Pega Infinity fully supports a modern, modular approach to application building, which enables the grouping of collections of Rules that address specific purposes into reusable modules.

Center-out

focuses on delivering customer and business outcomes by defining Microjourneys® to reach those outcomes

API-first

Designing applications prioritizes designing and building an API before working on any other aspects of the application (such as user interface or backend components).

Pega Constellation applies DX APIs to provide a standardized way of interacting with Pega Platform through a set of model-driven APIs.

Constellation hands-on L2

 Why Constellation - two giant leaps at the same time

To make Constellation work, two revolutionary changes needed to occur: one was technological, and the other shifted the paradigm of how applications should be created.



 

New underlying technology

 we spend more time online than ever before -  We expect a seamless experience, intuitive interfaces, and answers available at our fingertips.

The landscape of available technologies changes rapidly, the need to scale (v or h) is growing, and the old approach of monolithic systems does not cut it anymore.

Client-side orchestration and stateless API allowed Pega to move to single-page application architecture and achieve some staggering improvement in performance:

  • 3x faster interactions  
  • 7x smaller network payload  
  • 10x faster initial server response time  
  • 30% fewer requests on the first load
It allows to embed Pega workflows into the customer’s ecosystem, which gives  consistent experience both from the perspective of branding and across channels using Pega prescriptive authoring approach.

A new paradigm of building applications

Pega prescriptive authoring approach promotes configuration over customization
This way, app creators can focus on creating the best processes and workflow automation, and the design system handles how to display the content to the user across channels.

this approach opens the way to simple upgrades where developers upgrade pega without the risk bugs or reworks.

As a result, businesses can use any new emerging technologies and react quickly to new challenges of the ever-changing digital world.