pega-interview-questions for freshers

 

Pega interview questions

 

21. What do you mean by Locking in the context of Pega? What are the different types of locking? Explain them.

When two or more actions try to update a case at the same time, the most recent action may overwrite data written by the prior action. Overwrites can cause data corruption or loss, causing delays in case processing and possibly resulting in an inaccurate case resolution. If an application supports several users at the same time, a case locking strategy is critical for data integrity.

In Locking, we configure an appropriate locking technique for each case type to avoid data corruption or loss due to overwrites. Pessimistic locking and optimistic locking are two solutions that Pega Platform enables to balance the need for user access with the necessity for data security.

Pessimistic Locking: 

When an application uses a pessimistic locking approach to open an object, it uses an exclusive lock. When a person or a system opens an object, they have exclusive access to it until the application unlocks it. Other users are unable to edit the item while it is locked.

For example, an underwriter examines an open life insurance claim to determine the amount of benefit that a claimant is entitled to. As the underwriter collects evidence and updates the case, a complex claim may necessitate extensive computations and referrals to third parties, and any additional modifications may override claim values and generate an inaccurate payout to the claimant. Apply a pessimistic locking approach in this situation to prevent other users from overwriting data when the underwriter updates the claim and changes the payout amount.

Optimistic Locking: 

When an application uses an optimistic locking approach, it does not use an exclusive lock when opening an object. Instead, the item can be opened and edited at any moment by any user or the system itself. Before making any modifications to the item, the program checks to see if it has changed.

A manager, for example, may need to evaluate the most recent data for a given service request instance. A case worker may need to update the case at the same time as the manager does not need to update any information. Apply an optimistic locking approach in this situation to prevent the manager from locking the case and preventing a case worker from completing an assignment that would push the case toward resolution.

22. What do you understand about an exposed property in the context of Pega?

An exposed property is a Single Value property that is viewable as a column in a database table. A particularly structured Storage Stream or BLOB column contains aggregate properties, properties within an embedded page, and properties that are not exposed. A Storage Stream column named pzPVStream may be found in most PegaRULES database tables.

The record selection actions in list view and summary view rules are influenced by which properties are exposed. Your database administrator can make a property that was previously only saved inside the Storage Stream column into a distinct exposed column in many circumstances.

Single Value properties at the top level can only be exposed. If your application requires a column for embedded property values, the values can be transferred to the top level or provided indirectly using Index-class instances.

23. What is the Declare Index in Pega? How can you set up a declare index?

In Pega, Declare Index is a rule type that exposes aggregate properties like Page/ List/ Group for reporting purposes.They are rule instances of the Rule-Declare-Index.  When an Insert/ Update/ Delete operation on the work object is followed by a commit, it helps to populate the corresponding index table. They can be found under the SysAdmin Category in Records explorer.

There are two ways to set up a declare index in Pega. They are as follows :

Using the Declarative Wizard Approach : 

  1. Prepare ahead of time to identify the RuleSet and Version that will contain the wizard's rules.
  2. Check existing Declare Index rules to see if the property has already been indexed. (Do not try to index a property that has previously been indexed with this wizard.)
  3. In the Application Explorer, look for the embedded property. A Page, Page List, or Page Group property can contain the property.
  4. To get to the Application Explorer context menu, right-click. From the menu, choose Index Property.
  5. Select a RuleSet and Version in the first pop-up window to store the rules generated by this wizard. Submit the form.
  6. The class, property, and Declare Index rule produced are identified on a confirmation form. The indexing process has begun. To review the regulations, click the pencil symbol.

Using the Manual Approach :

  • Determine which property(ies) on the source object will be used to create the index instance.
  • Create a concrete class that extends the Index base class and holds the new index objects. The key for concrete classes generated from the Index base class is made up of three attributes in that order: pxInsIndexedKey, pxIndexCount, and pxIndexPurpose.
  • Determine which database table the new indexes will be stored in. If necessary, create a database table and associate it with the class using a Database Table instance. The table's three important characteristics must be visible columns.
  • In the new index class, define Single Value attributes to retain the values of the source instance properties. Confirm that all of these characteristics are exposed columns in the database with your database administrator, or change the database schema as needed.
  • Choose a name for the Declare Index rule.
  • Create a Declare Index rule, noting the source of each property value and the index property name it corresponds to.

24. How can you measure the performance of your application in Pega?

Following are the different ways by which we can measure the performance of our application in Pega :

DBTrace: The Performance Analysis Tool (PAL) has a feature called DBrace that provides a thorough log of calls to the PegaRULES database. DBTrace shows the time spent on each operation as well as the SQL queries delivered to the database.

Performance Analyzer Tool: The Performance Analyzer (PAL) displays all of the performance statistics collected by Pega PlatformTM. You can utilise PAL to figure out how much system resources a single requestor session uses. The Performance landing page (Dev Studio > System > Performance) and the Performance tool in the toolbar both have PAL.

The features of PAL includes the following:

  • To add reading
  • To add reading with clipboard size
  • To reset data
  • To save data
  • To configure DBTrace options
  • To start profiler
  • To show alerts

Alerts: Process Commander inserts a succession of text entries called alert messages to the performance alert log during application execution to identify mostly performance-related issues or faults. PegaRULES-ALERT-YYYY-MMM-DD is the most common name for the performance alert log.

Autonomic Event Services (AES): Exceptions are handled in the same way that alerts are. Exceptions generated by a Process Commander server are sent to the AES system via SOAP. The system parses the exceptions and registers them in the AES database's pegaam exception table. AES aggregates these records into work objects called AES exception items based on how frequently an exception occurs and the system events that produced those exceptions. The pegaam exception work table in the AES database is used to store these objects.

25. Explain Work List and Work Basket in the context of Pega.

  • Work List: 
    • A worklist is a list of open, unfinished assignments that are waiting for a user to complete them. As a result, a worklist display reveals selected Assign-Worklist instances. 
      A column that indicates a work item ID is commonly included in worklist presentations, but a worklist is not a list of work items. One work item may have two or more open tasks at any given moment. These assignments may appear on the worklist of a single user or on the worklists of multiple users.
      Assignments usually appear on a worklist because they were created by an Assignment shape in a flow. Assignments are ordered by assignment urgency, with the most urgent assignments appearing first and having the largest pxAssignUrgency value. If the user is inactive or exclusively works in a workspace other than Process Work, the information on the worklist display may become stale (outdated). To refresh the contents of the worklist, click the refresh symbol or interact with it.
  • Work Basket: 
    • A workbasket is a named list of open assignments that aren't assigned to a specific operator. An instance of the Data-Admin-WorkBasket class defines a workbasket. An organisation unit, a work group, and a calendar can all be linked to a workbasket. During system installation, a default@pega.com workbasket is generated as a last resort for assignment routing.
      The system makes assignments as work items proceed through a flow execution. Assignments can be linked to either human users (and display on their worklists) or workbaskets. A workbasket's "contents" are a collection of unprocessed tasks arranged in decreasing order of priority, comparable to a worklist's contents. The work queue is a term used to describe these assignments.

There are three ways that assignments leave a workbasket:

  • Users who are qualified can process an assignment by removing it from the workbasket.
  • Based on work schedules, due dates, talents, workloads, and other parameters, an application can automatically route assignments in a workbasket to users.
  • Managers can move assignments from a workbasket to the worklists of their employees.

26. Explain Declare Triggers in the context of Pega. How can you create a Declare Trigger in Pega?

Declare Trigger Rules establish the relationships between events in your case types. Declare Trigger rules, which conduct activities in response to a case's specified event. As a result, you're able to develop adaptable apps that properly fit your company's requirements. When your application creates, changes, or deletes a class in the database, declare Trigger rules to start actions. Actions in a case, such as storing a case or modifying information in a case, are related to operations on classes. Declare Trigger rules can also be used to track property changes and for auditing.

Following steps must be followed to create a declare trigger in Pega :

  1. Click Create Decision Declare Trigger in Dev Studio's header.
  2. Provide a descriptive name for the rule you want to establish in the Label area.
  3. Indicate where your application saves the rule in the Context section:
    1. Select an application to store the rule from the list of application layers.
    2. Enter the class to which the rule applies in the Apply to field. Property values in this class and classes that inherit from it are monitored by the system at runtime.
    3. Select a rule-set and a rule-set version to store the rule in the Add to rule-set list.
  4. Click on Create and Open.
  5. Select a type of event to trigger the rule in the Trigger when an instance is list on the Triggers tab:
  6. In the Condition section, in the When box, enter a When condition rule to run the rule only when a case fulfill given circumstances. The system checks the conditions at runtime and only executes the Declare Trigger rule if the When condition is true.
  7. Enter the activity that the rule initiates in the Name field of the Trigger activity section.
  8. Determine how the action will run in the Execute list.
  9. Click on Save and the Declare Trigger would be created.

27. What do you understand about Forward Chaining and Backward Chaining? Explain with examples.

Forward chaining:

Forward chaining is an internal mechanism that allows changes in one property value to be automatically propagated to other property values or indexes. For example, if the area property is dependent on the length and width properties, forward Chaining will cause the area property to be recalculated if the length or width values change.

Backward Chaining:

Backward chaining allows for automatic property calculation by executing the declarative rule when the value for the property is required rather than when the input changes. If the area property is dependent on the length and width properties, for example, backward chaining forces the area property to be computed each time it is needed. Except for the Rule-Declare-Expression, almost all declarative rules only implement forward chaining. We have the option of going forward or backward chaining in rule-Declare-Expression

Comments

Popular posts from this blog

Split For Each shape in pega - Parallel processing in Pega

Queue processor FAQ

Tickets in PEGA – its Configuration, Usage & Execution