Featured post

GetNextWork functionality in pega

What is GetNextWork in pega? Pega provided a functionality to get the most urgent assignment(task) for user to work on. This is configured o...

Pega - DECLARATIVE RULES Interview Q&A

Declaratives:

  Declarative rule is an instance of a class derived from Rule-Declared-

  They allow for automatic processing of Property values.

  No need to be called explicitly.

  No need to run in sequential fashion.

  System manages re-evaluation when it detects change.



 Name some declarative rules?

Rule-Declare-Expressions, OnChange, Constraints, Trigger, Index.

 What is Declare-Expression? Explain?

An Expression executed automatically in response to a property value change in with the expression.

Declare Expression rules are instances of the Rule-Declare-Expressions rule type. They are part of the Decision category.

We can create Declare-Expression rule instead of using a property set method in an Activity.

 What is the use of Page Context?

Page Context is used if target property is in PageList or PageGroup.

If target property has mode single value and appears directly on the page of applied to class, Page Context should be blank. This called Context-Free expression.

 What is Forward Chaining?

Forward Chaining provides the automatic calculation of the property by executing the declarative rule, when any one of the input property value is changed.

For example, if the area property depends on the length and width property, then Forward Chaining causes the area property to be recalculated every time either length or width values changes.

 What is Backward Chaining?

Back Ward chaining provides the automatic calculation of the property by executing the declarative rule, when the value is needed for property, rather than when input change.

For example, if the area property depends on length and width property, the back ward chaining causes the area property to be recalculated each time the area property is required.

 Almost all the declarative rules implement only forward chaining, except the Rule-Declare-Expression.

In rule-Declare-Expression, we have a choice to decide either we should go to Forward chaining or Backward chaining.

 Explain about Rule-Declare OnChange?

Runs an activity automatically when the value of a specified property changes.

It is always Forward Chaining.

If we specified more than one property, they all must be on same page.

  How to implement Rule-Declare-OnChange?

Ø  Create an instance of Rule-declare-OnChange

Ø  Select the properties we want this rule to keep a track of.

Ø  Optionally enter a when condition rule to be evaluated.

Ø  Provide the activity name of type OnChange.

 Explain about Declare Triggers?

Declare Trigger runs an activity when instances of specific classes are created, updated, or deleted in the Database.

Declare Trigger is always Forward Chaining.

 Explain about Constraints?

Constraints used to validation purpose.

Define and enforce relationship among property values.

Prevent user from advancing if constraint is not satisfied.

Prevent invalid data entered.

Constrains is always Forward Chaining.

 What is the difference between Constraints and Validation Rules?

Constraints are declarative rules triggered automatically when a property value changes.

Validation rules must be told when to run, when a form is submitted or Prior to running aFlow Action.

 Explain about Declare Index?

Declare Index rules are instances of the Rule-Declare-Index class.

Declare Index Automatically extracts a value from an embedded property when its value has changed.

They are part of sysadmin category.

 How do we implement the Declare Index?

Step 1: Create a class inherits from the Index- class.

Provide these three properties: pxInsIndexedKey, pxIndexCount, pxIndexPurpose.

Step 2: Create Rule-Declare-Index and provide Source Page Context and Source page

Context class, Index class to write.

Step 3: In list view, Join tab provide Declare Index name.




1 comment: