Pega Interview Concepts on Case Management

Sandeep Pamidamarri
5 min readDec 28, 2020

--

What is the difference between the CorrNew and SendCorrespondence activities?

  • The difference is to call the CorrNew utility activity from a flow to send correspondence if you want flow processing to continue on immediately.
  • Use the flow SendCorrespondence with the flow (subprocess) shape instead if processing needs to wait on correspondence verification. Neither CorrNew nor SendCorrespondence can be used with correspondence that specifies “Must Edit”. Corrs that require editing can only be created using the correspondence flow actions (SendCorrespondence or Notify).

How to invoke the Declare Collection rule from an activity?

  • Use the Collect Keyword — followed by the declare collection rule name.

How to restrict the Wait Shape resume operation for end-users?

  • On the Wait Shape, there is an option to disable the Users can choose to continue the process. This will not allow the user to user to perform any action on the Wait assignment.

How to propagate the page context data to the Multiple Child Cases that are getting created from the Page List property?

  • Create Case smart shape is nothing but the pxAddChildWork activity reference. There is a default extension data transform called pyAddChildWorkDefaults. It is used to propagate the data to the Child Page Context that is getting created.

How are the Parent and child cases locking mechanism works?

  • The locking strategy whatever we defined on the parent case is followed for the current case and to the corresponding child cases.
  • Default locking strategy — Locking the case for a single user for a defined time.
  • Optimistic locking strategy — Allowing multiple users to access and modify the case.

How the actual Java Threads or Parallel processing works in PEGA?

  • Spin-off && Split For Each — is the case shapes treated for parallel processing at the case lifecycle level.
  • But, actual Java Thread level parallel processing works using the QUEUE method as part of the activity invocation.

What is the difference between the Obj-Save-Cancel and Rollback methods?

  • Obj-Save-Cancel method cancels the most recent one deferred save.
  • Rollback method rollback all the deferred save operations.

How you will handle the flow changes that are in production?

There are three approaches to implement the flow changes that are already in the production.

Approach #1: Create distinct flows, and enable the “Creates new work object” to the newly created flows. Remove the “Creates new work object” on the old flows. Implement date circumstance to the existing flows.

Drawbacks:

  • If there are more subprocess levels than four then this is not the recommended approach.

Approach #2: Move all existing assignments, sub-process and wait shapes to the side of the flow. Inflight case assignments will follow the previous assignments and the new cases will follow the new assignments.

Approach #3: Add tickets to the newly modified flows. Run a bulk processing job to find all outdated assignments in the system. For each assignment, the bulk processing should call Work-.OpenAndLockWork, then call Work-.SetTicket on the work page.

Pros:

  • Newly modified flows are clean

Approach #4: Revert the user’s ruleset list to original, lower versions when dealing with older assignments

Pros:

  • When changes go beyond the flow rules, then this is the only sure approach.

How will you handle the 10–15 fields changes as part of the screen?

  • Approach #1: If it is very few fields like 3–5, then have to use the Field Level Tracking feature. It is nothing but the declare trigger. Extend the “pyTrackSecurityChanges” data transform into the appropriate work class.
  • Approach #2: If it more fields let’s say 10–15, then the approach is different. Populate the required fields into a temporary page or a complete work page. Then convert the page into JSON or XML using the functions — pxConvertPageIntoJSON, pxConvertPageIntoXML. Store the respective string property into a dedicated table.

How you will instantiate a child case manually?

  • In the case type definition, add the child case and expand the configuration to select the Manual Instantiation. This particular option allows you to create the child case using OOTB “Add Work” drop-down menu.
  • Create a process using the Create Case Smart Shape. Invoke this process using the optional process as part of the case life cycle definition. This sub-process will show in the Other Actions of a flow action.

What is the advantage of maintaining a case-type specific ruleset?

The main use — when creating a case type that does not extend a Foundation application case type it is advantageous to add that case type to a new, case type-specific ruleset. Doing so will facilitate the development of component applications. When this approach is followed, and an application is built on PegaRULES, every case type would exist in its own ruleset. While the application rule, work pool class and application data classes would exist in the ruleset created by the New Application Wizard.

A case type that appears to be a good candidate for a component application should avoid dependencies on the work pool class and application-level data classes. Instead, the case type component candidate should utilize the data class that the application-level data classes extend. Similarly, work pool rules that the case type component candidate uses can be moved to the layer beneath the current application.

What is the case id generation mechanism in PEGA?

Traditional way: In general, case with appropriate prefix gets next sequence number from pc_data_uniqueid table. GetDataUniqueID is used and this function makes a database call to get the next case number and returned to the app node.

Con: With this approach, production environment with multiple nodes will have a performance impact. The communication between the app node and database is costly.

New mechanism: From 8.3 onwards — PEGA introduced the concept of Case ID batching. Based on the case id prefix, an app node is allocated a defined batch size from the pc_data_uniqueid table for the very first call. Next subsequent call will use the next id in the allocated batch in the respective node.

Pro: This new mechanism is effective in improving the performance.

Con: Business impact is that Case ID sequence is not maintained. System determines the case id sequence.

Note: You can determine the batch size using the Dynamic System Settings: idGenerator/defaultBatchSize.

If you want to maintain the sequence then set this DSS to 1

--

--

Sandeep Pamidamarri
Sandeep Pamidamarri

Written by Sandeep Pamidamarri

Digital Transformation Leader | Pega Lead Solution Architect | Pega Certified Data Scientist | Pega Customer Service | Pega Sales Automation | AWS Cloud

No responses yet