Discussion

30
Views
BraamCLSA Member since 2012 100 posts
PEGA
Posted: September 23, 2020
Last activity: September 24, 2020

Encapsulation: Promoting reusability of rules with minor variances [LSA Data Excellence]

How to promote reusability of encapsulated rules that have minor variances? For example, different Zip Code formats, different layouts of Address.

Anticipate the scenarios that will be subject to variance and consider whether you are dealing with different data or rules, or a different visualization of the same data and rules. 

An Australian Address "is a type of" Address, just as a United States Address "is a type of" Address. 

One option is that these are each subclasses of an Address super-class, each of which have different Zip Code validation rules, and each invoke a different address validation service. 

Alternatively these could be fulfilled with circumstancing. 

Perhaps the variable behavior is only with respect to the ZipCode, and that itself may be a candidate for its own class that can have subclasses with the variations.

Parameterizing your reusable rules to respond to different behaviors is a worthwhile technique.

As the Lead System Architect, know all your options and make a judgment as to whether an inheritance-oriented class model, circumstancing, or another approach delivers the right business outcome for your application's needs and your delivery team's capabilities.

 

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

Pega Platform 8.4.1 Data Integration Case Management Lead System Architect Senior System Architect Developer Knowledge Share
Share this page LinkedIn