Wednesday, January 3, 2024

Constellation



 Decoding the Power of Pega Constellation


Pega has introduced a new design system called constellation which is based on views instead of section and harness. Constellation is more towards configuration than customization.

The ongoing evolution of the Pega Infinity™ architecture includes the latest iteration, which is called Constellation. Constellation includes a new client-side engine that orchestrates Pega Platform application logic and data with any front-end design system. While Constellation is front-end agnostic, it is the basis for Cosmos React UI. 

There are 3 aspects in the Pega Constellation architecture :
1. Pega
2. Customer Extension
3. Builder Tools

Pega Infinity Server - This is where we are creating our applications, case types leveraging all the powerful capabilities of Pega.

There are 2 additional deployment components 
1. Constellation CDN (Static content)
2. App Static Services

When the user browser is accessing the Pega application which is built on a constellation, the browser reaches out the CDN and requests all out of the box static assets i.e. Presentation Components like how text boxes, radio buttons should be displayed.
Constellation DX components that are more complex compositions of presentational components.

Constellation Orchestration Layer - The Constellation architecture orchestrates the connection between the Pega Infinity Server and the front-end design system that is used to render the application’s user interface with the DX APIs.






Thursday, December 21, 2023

ECS

 https://academy.pega.com/topic/enterprise-class-structure/v1

https://krishnapega.blogspot.com/2016/05/enterprise-class-structure.html

https://www.pegahelp.com/2020/05/pega-enterprise-class-structure-ecs.html

https://rulesware.com/pega-evolution-of-the-enterprise-class-structure-a-perspective-of-the-last-decade/



Thursday, December 14, 2023

Pega general code review checklist

  1.  Declaratives over procedural.
  2. Reusability and Components.
  3. Extension points
  4. Avoid loops
  5. Server side validation vs Client side validation

1) Reusability - While creating/refactoring rules, always evaluate the reusability aspect. Create/move the rules to WorkPool/Work- class for better reusability.

2) Prefer Declarative over procedural processing.

3) Avoid creating section rules with 1-2 fields.

4) Avoid creating the top level scalar properties on the Casetype class (or WorkPool class). Designing better data model always fetch the future maintenance of the application. 

5) For properties that hold 'Amount' (or other decimal values) create property with type Decimal (with the desired precision as qualifier)

6) Leverage Background requestor for better user experience - Delegate the processing to background requestor such as queue processor/Agent.

7) Do not use the OOTB top-level properties for handling the processing logic. (For example, pyErrorMessage property was being used in svcPerformFlowAction OOTB activity).

8) Keep in mind the DB column size of the below properties (Especially pyLabel, PyDescription..etc)

Performance checklist

  1.  Declare index vs. exposing columns
  2. Keyed data page
  3. Virtual list copy
  4. Parallel connectors/Load data page async
  5. Simple condition as first condition in AND or OR
  6. Appropriate scope for Data pages.
  7. Reload per interaction
  8. Refresh strategy for node level datapage
  9. Report definition over obj methods

1) DB Indexes :  Analyze the query plan. Create DB Indexes on the columns that used on the filter conditions of the RD.
2) Avoid reading from Blob : Lookups read the entire blob column, so avoid reading the BLOB. Prefer to use RD's.
3) Background processing : Leverage background processing, wherever the need of processing and the data need not be shown to the user immediately. ( Agents, QueueProcessor, Async activity, load-datapage, Queue method)
4) Keyed data page : Read the data 
5) Node level : Cache the frequently accessed data in-memory.
6) Deferred loading : Configure the deferred loading on the parts of the screen (sections) that they are not interested to see imemediately.

Pega Security check list

  1. Guardrails
  2. Security alerts log
  3. Service package should be authenticated (at least basic auth + TLS)
  4. Appropriate roles + RAROS + AccessWhens + Privileges 
    • Secure Activities, flow actions, visibility through privileges
  5. Always perform server side validation
    • Data validations 
    • Attachments at certain assignment
    • Etc.
  6. Encryption
  7. Lock application and rulesets
  8. Do not deploy checkout rules
  9. Do not include operator records in Production, Block unused operators in PROD. Disable PRServlet servlet in PROD
  10. CSRF
  11. CORS
  12. CSP
  13. Appropriate logging levels
  14. Password hashing: bcrypt algorithm
  15. Authentication timeout
  16. Field level auditing
  17. Security events
  18. Client based access control : what application data is subject to data privacy regulations like GDPR and how access to that data will be handled.
  19. Secure file uploads:
  20. XML/AllowDocTypes dynamic system setting is set to false.


Saturday, April 23, 2011

Thinking "Out of the Box"

Many hundreds of years ago in a small Italian town, a merchant had the misfortune of owing a large sum of money to the moneylender. The moneylender, who was old and ugly, fancied the merchant's beautiful daughter so he proposed a bargain. He said he would forgo the merchant's debt if he could marry the daughter. Both the merchant and his daughter were horrified by the proposal.

The moneylender told them that he would put a black pebble and a white pebble into an empty bag. The girl would then have to pick one pebble from the bag. If she picked the black pebble, she would become the moneylender's wife and her father's debt would be forgiven. If she picked the white pebble she need not marry him and her father's debt would still be forgiven. But if she refused to pick a pebble, her father would be thrown into jail.
   
They were standing on a pebble strewn path in the merchant's garden. As they talked, the moneylender bent over to pick up two pebbles. As he picked them up, the sharp-eyed girl noticed that he had picked up two black pebbles and put them into the bag. He then asked the girl to pick her pebble from the bag.
   
What would you have done if you were the girl? If you had to advise her, what would you have told her?  (Stop reading further and think for a while)


Careful analysis would produce three possibilities:

1. The girl should refuse to take a pebble.
2. The girl should show that there were two black pebbles in the bag and expose the moneylender as a cheat.
3. The girl should pick a black pebble and sacrifice herself in order to save her father from his debt and imprisonment.

The above story is used with the hope that it will make us appreciate the difference between lateral and logical thinking.
The girl put her hand into the moneybag and drew out a pebble. Without looking at it, she fumbled and let it fall onto the pebble-strewn path where it immediately became lost among all the other pebbles.

"Oh, how clumsy of me," she said. "But never mind, if you look into the bag for the one that is left, you will be able to tell which pebble I picked." Since the remaining pebble is black, it must be assumed that she had picked the white one. And since the moneylender dared not admit his dishonesty, the girl changed what seemed an impossible situation into an advantageous one.

MORAL OF THE STORY: Most complex problems do have a solution, sometimes we have to think about them in a different way.

Tuesday, April 19, 2011

Life is actually a reflection of our thoughts and actions...


Long ago in a small, far away village, there was place known as the House of 1000 Mirrors.

A small, happy little dog came to know of this place and decided to visit. When he arrived, he bounced happily up the stairs to the doorway of the house.

He looked through the doorway with his ears lifted high and his tail wagging as fast as it could. To his great surprise, he found himself staring at 1000 other happy little dogs with their tails wagging just as fast as his.

He smiled a great smile, and was answered with 1000 great smiles just as warm and friendly. As he left the House, he thought to himself, "This is a wonderful place. I will come back and visit it often."

In this same village, another little dog, who was not quite as happy as the first one, decided to visit the house. He slowly climbed the stairs and hung his head low as he looked into the door. When he saw the 1000 unfriendly looking dogs staring back at him, he growled at them and was horrified to see 1000 little dogs growling back at him. As he left, he thought to himself, "That is a horrible place, and I will never go back there again."

All the faces in the world are mirrors. Just observe what kind of reflections do you see in the faces of the people you meet..