Polymorphism use case: Regionally-specific address structures [LSA Data Excellence]
Are Regionally-specific address structures another Polymorphism use case?
I think this is a good use case for Polymorphism.
- USA, Canada and Australia all capture "State" whilst (most) other countries do not.
- Canada could class-specialize a Field Value rule for "State" to be labelled "Province".
- Postcode validation algorithms vary by country.
- Each country likely has a preferred Address validation service that returns a standardized format of a validated address that can be used by the application.
All of this could be encapsulated in the country-specific, class-specializations for each type of address.
Discussion on this topic was sought from the LSA Data Excellence (Pega 8.4) webinar conducted in July 2020. The webinar and its full set of discussions that arose from it are available at LSA Data Excellence: Webinar, Questions & Answers.