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.

Tables[edit]

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 whereas 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 two newly introduced parameters.

The parameters are -

  1. ReturnOnlyActive : If set to true, returns only active records. Records with the status value as 'Active' or 'empty/null' are considered as active records. If set to false/empty, returns all the records.
  2. SectionReadOnly : This is an internal parameter. This will be effective when ReturnOnlyActive parameter value is true. Value -1 returns all the records, value other than -1 returns only 'Active' records.

Note: Usage of first parameter ReturnOnlyActive is the preferred method to achieve soft delete functionality when there is no intention of making use of platform parameter SectionReadOnly.

Below table illustrates the results for different values of parameter ReturnOnlyActive when used alone

ReturnOnlyActive param value Expected results
false Will return all the records (maintains backward compatibility)
true Will return the Active records or records with empty/null status

Below is an example data page that shows the addition of two new parameters.

Implementation in Financial Services (FS) applications[edit]

In applications where same sections are used both in read only and editable modes, the second parameter SectionReadOnly can be made use of. The OOTB platform parameter SectionReadOnly needs to be directly passed into this parameter. ReturnOnlyActive needs to be set to true for SectionReadOnly parameter to be effective. Below table illustrates the results for various values of the two parameters

ReturnOnlyActive SectionReadOnly Expected results
false NA Will return all the records (maintains backward compatibility)
true -1 Will return all the records and this is the configuration to be used to get all the records in the readonly sections
true Any value other than -1 Will return only the active records and this is the configuration to be used for editable sections to return only active records

Example configuration for an autocomplete field

DP with soft delete.png








Note: The above implementation is purely dependent on the availability of the platform parameter SectionReadOnly and any changes in the platform will impact this. Hence to be used with caution.