Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Extending mapping using the MapToEntity pattern

Updated on September 18, 2020

The Provider and Authorization APIs are configured using this extension pattern.

MapToEntityWrapper - Rather than implementing individual Data Transforms in each class of the object hierarchy, a single MapToEntityWrapper rule is configured @baseclass and is available across the entire system. This rule accepts a single Page Name parameter called Integration Page. This is defined on the “Pages & Classes” tab as being of type PegaHC-Int. As all incoming JSON request pages adhere to this contract, the run time parameters passed will be acceptable.

  1. Open Data Transform rule: MapToEntityWrapper configured @baseclass. This rule provides two extension data transform placeholder rules in addition to the MapToEntity rule for the pre-configured mapping provided by the Foundation:
    1. Copy the PreMapToEntity_EXT rule into your ruleset at the appropriate PegaHC- Int resource class that requires pre-processing ahead of the standard mapping.

      You may need to create implementations of this rule when you have created subclasses of the PegaHC-Int domain entity that is being mapped and need to ensure that the appropriate custom class is instantiated at run-time via dynamic class injection (the Dynamic Class Referencing pattern). This allows for proper use of polymorphism throughout the system and minimizes the instances of override properties being created for each Page, Page List and Page Group property provided by the Foundation.

    2. Copy the PostMapToEntity_EXT rule into your appropriate resource class and extend for post-processing after the mapping is done.
  2. Open Data Transform rule: MapToEntity configured at the PegaHC-Int class for each domain e.g. PegaHC-Int-Authorization. This rule provides the pre-configured mapping for the Resource and its subpages. It provides a placeholder extension rule called MapToExtensionDetails_EXT.
  3. Copy the MapToExtensionDetails_EXT into your ruleset for the desired Resource or its sub- page class to extend the mapping beyond what is pre-configured.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us