Designing case specialization and extensibility
3 Tasks
1 hr
Scenario
In the future, MDC wants to pursue home and office moving services for individual customers. A dedicated truck and driver will be assigned for each individual moving request. Accordingly, the pricing and delivery tracking will differ. Now, your job is to:
-
Analyze the key requirements to determine if the current application design supports these requirements.
-
Prepare a list of questions that can be presented to the MDC, asking for clarification.
-
Recommend the most appropriate enterprise class structure for the application going forward.
The following table provides the credentials you need to log in to the Delivery Service application. However, this challenge is mainly meant for evaluating the design options, and there are no specific implementation tasks.
Role | User name | Password |
---|---|---|
Admin | admin@deliveryservice | rules |
Detailed Tasks
1 Identify design options
The key requirement is to implement business logic that is specific to the customer type (Business or Individual) when the need arises.
There are three possible approaches to this requirement.
Data-driven rules
In this approach, you model the differences between type of customer as either data instances or custom non-Pega rules that are treated as data. Rules are developed with the ability to react based on type of service (Delivery service/ Moving services).
Single application rule specialization
The single application approach satisfies the current routing requirements that make use of the org structure. If only a few differences are anticipated between the delivery and moving services, circumstancing can suffice. For more complex differences, you can use pattern inheritance and utilize service-specific classes that have been defined. Then, you can use Dynamic Class Reference (DCR) to decide which class to create.
Application for each service type
The multiple applications approach also satisfies the current routing requirements that make use of the org structure. Case types within each service-specific application extend a case type class within the current application. Service-specific business logic differences are handled by saving the rule from the current application to the corresponding case type class in the service-specific application. Users must switch applications to create and manage cases for different services if the users are the same for both services.
2 Evaluate design options
Review the pros and cons for each design option in the following table:
Design approach | Pros | Cons |
---|---|---|
Data-driven rules |
|
|
Single application rule specialization |
|
|
Application for each service type |
|
|
3 Recommend the best design option
If data needs to be stored separately in a different database, your solution must include separation of concerns, and so a different application for each service would fit the requirements. Otherwise, a single application implementation is recommended.
Confirm your work
Available in the following mission:
Want to help us improve this content?