Sunday, July 30, 2023

OBJ and RDB Methods

 OBJ Methods


Obj-Save-Cancel will cancel the immediate member of uncommitted Obj-Save in the differed queue.

Rollback will cancel all the DB methods which are not committed prior to the method step in the differed queue.


RDB Methods


There are 4 main variations in RDB methods where we need to provide mandatory parameters when calling.

  1. RDB-List --> Obj-browse
  2. RDB-Delete --> Obj-Delete
  3. RDB-Save --> Obj-Save
  4. RDB-Open --> Obj-Open

Mandatory parameters

  • Class Name - The class which is corresponding to datatable
  • RequestType - This refers to the ConnectSQL rule. In practice it is possible to define separate ConnectSQL for each RDB method or alternatively we can define all the RDB methods in the same ConnectSQL rule since we have separate tabs for each RDB method.

  • Access - Which is about which type of Database type we are connecting to eg:- Oracle, PostgreSQL, MySQL etc. we set it as All allowing all types of Databases.



Why do we use RDB methods?

Sometimes it's a bit difficult to create a query using obj methods due to complexity. In such situations we go for RDB methods we can directly write the query inside it which also improve the performance also since it will save the time to generate the SQL query also.

Enterprise Class Structure | Situational Layer Cake | Components

 Enterprise Class Structure (ECS)





Situational Layer Cake is a patent term for Pega Platform. It's about placing the source code facilitating the enterprise specializations.


Above is an example of how directed and pattern inheritance work in ECS.


Components 

A component is a collection of rulesets that create a small feature that can be added to any application created in the Pega Platform.

For more details on Components follow the below link

https://docs-previous.pega.com/sites/default/files/help_v73/basics/v6portal/landingpages/application/components.htm#:~:text=A%20component%20is%20a%20collection,ruleset%20to%20avoid%20naming%20conflicts.

After Pega 7.2, the platform has allowed to build applications on top of another applications restricting only to frameworks. Therefore, it's we can directly base application instead of a framework and also we can use components when building the applications. It further facilitates the further reuse of the existing functionalities. 












Thursday, July 27, 2023

Agents in Pega

 Agents

Standard Agents and Auto Queue Management 

Standard Agent is the legacy version of the Queue Processor in Pega 8.In Pega 8 if we want to call it in a case step we need to call a utility shape and pass the required parameters AgentRuleSet and AgentName.


How the Standard Agent work

  1. Once the item is queued, this particular item will be pushed to PR_SYS_QUEUES table, where the entire WO data will be copied.
  2. Then once the Agent wakes up it refers the PR_SYS_QUEUES table and picks each item one by one and executes.
  3. Once the Queue item is successfully executed the item will be removed from the table.(Agent activity will be executed to the number of times equal to the number of items in the table)
  4. Once the Agent finishes executing all the queue items it will go to sleep.

Once the queue item is moved to PR_SYS_QUEUES table it will the table will hold property value called pyItemStatus where its value will be Scheduled

if the agent activity fails while executing an item in the list that item will be updated in the table with the status of Broken-Process

This entire process is managed by PRPC there for its called Auto Queue Management.



Case Dependency | Wait Shape

Application of Wait Shape

Wait shape can be used in two different ways mainly
  1. Case dependency 
  2. Timer

Case Dependency



Here, the flow can be configured to wait in a way that either any of the child cases to be resolved or till all the cases are resolved/reach a specified status.

Optionally, the wait step can be configured in a way that the current user is allowed to manually skip waiting by checking the check box. below.

In here, not only the child case even the parent case can be put on wait based on specified case status (Case status could have been modified by another parallel process such as a queue processor).

Timer 




In the Timer option, we can either hard code the specific wait time in Days, Hours and minutes or dynamically if referred through a DateTime property.

Rule Delegation

 Summary of Rule Delegation The purpose of Rule Delegation is to make the rule available in the production environment for customization for...