CPSA - Certified Pega System Architect Data Modeling and Properties Questions and Answers 1 — Questions and Answers
Question 1: A developer needs to model a data structure to hold a list of vehicles associated with a customer. Each vehicle has a make, model, and year. The number of vehicles per customer varies. Which property mode is most appropriate for this requirement?
- Single Value
- Page
- Page List (Correct answer)
- Page Group
Correct answer: Page List
A Page List is the correct choice because it represents an ordered list of pages, where each page can represent a single vehicle with its own properties (make, model, year). This allows for a variable number of vehicles to be associated with the customer.
Question 2: In a Pega application, a developer is building a case type for loan applications. The application needs to store the primary applicant's information, including their full name, date of birth, and address. The address itself is a complex data object with properties for street, city, state, and zip code. How should the address information be modeled within the applicant's data structure?
- As a Value Group property.
- As a Single Page property. (Correct answer)
- As a series of Single Value properties directly on the applicant.
- As a Page List property.
Correct answer: As a Single Page property.
A 'Page' property is the ideal way to model the address. It encapsulates a group of related properties (street, city, etc.) into a single, logical object. This promotes reuse and better data organization compared to adding individual properties for each address field directly to the applicant data model.
Question 3: Which of the following is considered a Pega best practice for naming data properties to avoid redundancy?
- Prefixing the property name with the name of the data class it belongs to.
- Appending the word 'Details' to properties that represent complex objects.
- Using a property name that is concise and does not repeat the context of its owning class. (Correct answer)
- Including the data type in the property name, such as 'CustomerNameText'.
Correct answer: Using a property name that is concise and does not repeat the context of its owning class.
Pega best practices advise against redundant naming. If a property 'StartDate' exists within a data class named 'Event', it is unnecessary to name the property 'EventStartDate'. The context is already understood from the class, so the concise name 'StartDate' is preferred.
Question 4: A business requirement states that a user's entered phone number must conform to a specific format (e.g., (###) ###-####). Which type of rule is most suitable for enforcing this specific format validation on the property itself?
- A Validate rule
- An Edit Validate rule (Correct answer)
- A Data Transform
- A Declare Expression
Correct answer: An Edit Validate rule
An Edit Validate rule is used for client-side, format-based validation of a single property. It typically uses Java to define a specific pattern, like a phone number or postal code format, and returns true or false.
Question 5: When is it preferable to use a Data Transform instead of an Activity for data manipulation?
- When performing complex loops or parallel processing.
- When needing to call external services or write custom Java code.
- When setting default values, copying pages, or mapping data between objects. (Correct answer)
- When running recurring scheduled events or background processing.
Correct answer: When setting default values, copying pages, or mapping data between objects.
Data Transforms are the preferred, lightweight mechanism for common data manipulation tasks like setting initial property values, copying data from one page to another, and mapping values. Activities are more powerful but are resource-intensive and should be reserved for more complex operations like background processing or integrations where no other rule type is sufficient.
Question 6: An application's data model includes an 'Organization' data class. Several different applications within the enterprise will need to use this same 'Organization' data structure. According to Pega's Enterprise Class Structure best practices, where should this data class be defined?
- In the case type's class layer.
- In a separate ruleset within the specific application layer.
- In the enterprise-level class layer. (Correct answer)
- Directly in the @baseclass layer.
Correct answer: In the enterprise-level class layer.
Data classes that are central to how an organization conducts business and are likely to be reused across multiple applications should be defined at the enterprise layer. This promotes reuse and consistency, avoiding the need for data mapping and integration between applications that should be sharing the same data structure.
A developer needs to model a data structure to hold a list of vehicles associated with a customer.
Each vehicle has a make, model, and year.
The number of vehicles per customer varies.
Which property mode is most appropriate for this requirement?