Delete reference data record (Soft-Delete) without physically removing record from the table in PFFS

From PegaWiki
Soft-Delete Functionality in Pega Foundation for Financial Services / This is the approved revision of this page, as well as being the most recent.
Jump to navigation Jump to search

Delete reference data record (Soft-Delete) without physically removing record from the table in PFFS

Description Deleting a record without physically removing it from the table
Version as of 8.8
Application Pega Foundation for Financial Services
Capability/Industry Area Financial Services

Soft-Delete functionality in Pega Foundation for Financial Services (PFFS)[edit]

Soft-Delete represents functionality to omit data from being displayed or processed without physically deleting records from tables. Table record can be marked as Active or Inactive, allowing functionality to determine which records to retrieve. Since data is not physically deleted, customer has extra safety net that Soft-Delete can always be reversed by simply changing the status of the record from Inactive to Active.


Pega Foundation for Financial Services (PFFS) implemented Soft-Delete functionality on several reference data tables:

FSF_REF_COUNTRY (Country codes, names and risk)

FSF_REF_SECTOR  (Industry sector codes and descriptions)

FSF_REF_EXCHANGE (International exchange codes and names)

FSF_REF_REGULATOR (International regulator codes and names)

FSF_REF_INDUSTRY (Industry codes and descriptions)

FSF_REF_SUBINDUSTRY (Subindustry codes and descriptions)

FSF_REF_INDUSTRYGROUP (Industry group codes and descriptions)

FSF_RELCODE (Related party codes and descriptions)

Each table, listed above, has been extended with status column representing if record is Active or Inactive. The status values ‘Active’ or NULL represents an active record where as a status value 'Inactive' represents an inactive record.

Possible values for status column are Active, Inactive, and NULL. Values are case sensitive.

View of FSF_REF_EXCHANGE table with status column values set to ‘Active’ for each record.

Tables with Active Column.png

Class Structure[edit]

Represents corresponding data and integration classes for each reference data table listed above. Additional information on data integration can be found in PFFS Implementation Guide on Pega Foundation for Financial Services Community site.

Data Class Integration Class
PegaFS-Data-Country PegaFS-Int-FSF_REF_COUNTRY
PegaFS-Data-Sector PegaFS-Int-FSF_REF_SECTOR
PegaFS-Data-Exchange PegaFS-Int-FSF_REF_EXCHANGE
PegaFS-Data-Regulator PegaFS-Int-FSF_REF_REGULATOR
PegaFS-Data-Industry PegaFS-Int-FSF_REF_INDUSTRY
PegaFS-Data-SubIndustry PegaFS-Int-FSF_REF_SUBINDUSTRY
PegaFS-Data-IndustryGroup PegaFS-Int-FSF_REF_INDUSTRYGROUP
PegaFS-Data-RelCode PegaFS-Int-FSF_REF_RELCODE

Soft-Delete logic[edit]

Data pages returning a list in each corresponding data class have been altered to return only active records or all records based on the new parameter value.

Note: New parameter is a system (Pega platform) value -1 or NULL passed via section.

This logic is illustrated by example in data class for Exchanges: PegaFS-Data-Exchange. Data page D_ExchangeSummary

Data Page with Read Only Parameter.png

Data page conditions to handle NegativeOneReadOnly parameter:

If CheckNegativeOneReadOnly is true (-1 value is passed), then only active records are returned by GetExchange report definition and otherwise GetExchange report definition returns all records.

Data Page Conditions for Read Only.png

If NegativeOneReadOnly parameter is -1 then ‘InActive’ is passed for Status parameter to be used in the report definition condition to return only active records. Report will return all records that are NOT Inactive. This condition will return records marked as Active or NULL.

Report Definition with Status Parameter.png

The default passes string ‘NotNegativeOne’ in the Status parameter to return all records. Since the possible values in status column are Active, Inactive, and NULL then report condition status is NOT ‘NotNegativeOne’ will return all records.

Report Definition to Return All Records.png

Report definition GetExchange contains conditions for passed parameters, Note the condition for status column:

Where Condition for RD.png

Implementation in Financial Services (FS) applications[edit]

Soft-Delete functionality implementation in Client Lifecycle Management (CLM)/Know Your Customer (KYC) Financial Services (FS) application consists of having duplicate sections: one for displaying read only, active records and another for editing data, displaying all Active and Inactive records. System parameter (-1) is passed to the data pages to trigger report definition for active records, otherwise all records are retrieved.

End result and use case[edit]

In Dev Studio, Configure -> Financial Services -> Reference Data will open a landing page to manage country records. Each record can be set to Active or Inactive status. Inactive records will be excluded from any processing/selection logic.