CPSA - Certified Pega System Architect Business Logic and Decisions Questions and Answers 1 — Questions and Answers
Question 1: An insurance company determines car insurance premiums based on two independent factors: the driver's age group (e.g., 18-25, 26-40, 41+) and the vehicle's safety rating (e.g., Low, Medium, High). The logic is represented as a grid where each combination of age group and safety rating has a specific premium amount. Which type of decision rule is most suitable for modeling this requirement?
- Decision Tree
- Map Value
- Declare Expression
- Decision Table (Correct answer)
Correct answer: Decision Table
A Decision Table is ideal for logic that can be represented as a table or grid, where the result depends on testing the values of multiple independent properties. It evaluates rows of conditions to return a value, which perfectly fits this scenario.
Question 2: In an order management application, the `LineItemTotal` property must always be equal to the `Quantity` multiplied by the `UnitPrice`. A system architect needs to ensure that whenever `Quantity` or `UnitPrice` is changed by the user, `LineItemTotal` is automatically recomputed in the background without requiring a user action. Which rule should be used to configure this automatic calculation?
- A Validate rule triggered on submit.
- A Declare Expression configured on the `LineItemTotal` property. (Correct answer)
- A Data Transform called by a flow action.
- An Activity that runs on a nightly schedule.
Correct answer: A Declare Expression configured on the `LineItemTotal` property.
A Declare Expression defines a computation that automatically updates a target property's value whenever any of the source properties in the expression change. This is the most efficient and declarative way to handle such calculations using forward chaining.
Question 3: A company's internal application needs to display the full name of a department based on its two-letter abbreviation. For example, 'HR' should map to 'Human Resources', 'FN' to 'Finance', and 'IT' to 'Information Technology'. The logic involves a single input (the abbreviation) mapping to a single output (the full name). Which rule is the most direct and efficient way to implement this one-to-one mapping?
- Decision Tree
- Declare OnChange
- Map Value (Correct answer)
- Decision Table
Correct answer: Map Value
A Map Value rule is specifically designed for mapping a single input value to a corresponding single output value. It is simpler and more efficient than a Decision Table or Decision Tree for this type of one-dimensional mapping.
Question 4: A bank needs to determine the required level of approval for a loan. If the loan amount is less than $50,000, it requires 'Loan Officer' approval. If the amount is between $50,000 and $250,000, the logic then checks the applicant's credit score. If the score is above 700, it requires 'Manager' approval; otherwise, it requires 'Senior Manager' approval. Which rule best models this nested, if-then-else logic?
- Map Value
- Decision Tree (Correct answer)
- Declare Expression
- Decision Table
Correct answer: Decision Tree
A Decision Tree is ideal for implementing complex, nested conditional logic (if-then-else). It evaluates conditions in a hierarchical structure, which perfectly matches the scenario where one condition (loan amount) determines which subsequent condition (credit score) should be evaluated.
Question 5: A business rule for a new credit card application states that the applicant's requested credit limit (`.RequestedLimit`) cannot exceed their calculated maximum allowable limit (`.MaxAllowableLimit`). If a user enters a value for `.RequestedLimit` that is too high, a message must be displayed immediately on the screen, even before the form is submitted. Which rule should be used to enforce this immediate validation?
- A Validate rule in the flow action.
- A Trigger that runs on save.
- A Declare Constraint on the `.RequestedLimit` property. (Correct answer)
- A Declare OnChange that calls a validation activity.
Correct answer: A Declare Constraint on the `.RequestedLimit` property.
Declare Constraints are used to enforce that a specific condition on a property is always true. If the condition is violated, the system immediately flags the property with an error message, providing instant feedback to the user as data is entered.
Question 6: In a purchase order case, a data page returns a list of line items (`D_LineItems.pxResults`), which is a `Page List` property. A developer needs to copy each item from this source list into the case's `LineItems` property. For each item copied, the `ItemStatus` property must be set to 'Pending'. Which action within a Data Transform is used to iterate through the source list?
- Update Page
- Append and Map to
- For Each Page In (Correct answer)
- When
Correct answer: For Each Page In
The 'For Each Page In' action in a Data Transform is specifically designed to loop through each page (element) in a target Page List or Page Group. Within this loop, you can then define actions, such as appending to another list and setting property values for each iteration.
An insurance company determines car insurance premiums based on two independent factors: the driver's age group (e.g., 18-25, 26-40, 41+) and the vehicle's safety rating (e.g., Low, Medium, High).
The logic is represented as a grid where each combination of age group and safety rating has a specific premium amount.
Which type of decision rule is most suitable for modeling this requirement?