Business Logic and Decisions Flashcards
6 cards from real CPSA practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 Business Logic and Decisions flashcards as text
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?
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.
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?
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.
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?
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.
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?
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.
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?
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.
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?
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.