Skip to main content
Version: 18

Data Removal

🎯 Functional documentation​

A data removal provider can be used to bulk delete dossiers and parties. For each data object (dossier, party, …) that is eligible for removal, the provider will create an event.

The removal itself is handled by configuring a custom action linked to this removal event.

info

Jobs that failed because the entity could not be deleted for any reason will not be retried and will not be reported. Only a logging event of the failure will be created with the reason why the deletion failed.

⚙️ Configuration​

Required parameters:​

  • DELETE_DATA_TYPE: Determines what data this provider will remove. Can be either PARTY or DOSSIER. Based on this setting, a job will be created to remove the corresponding data.
  • SUPPORTED_FSP: Only data from these FSP's will be eligible for removal.
  • SYSTEM_USER: The user that will be linked to the data removal.
  • DOSSIER_FILTER or PARTY_FILTER (depends on the DELETE_DATA_TYPE): Determines which dossiers/parties will be removed. See Dossier Filter or Party Filter for more information on how to configure the filter.

Optional parameters​

  • CRON_SCHEDULE: Determines the periodic interval to run the provider. When not provided, the provider can only be triggered manually via the admin UI: organizations > org x > triggers.
  • INCLUDE_PARTIES (only when DELETE_DATA_TYPE=DOSSIER): Defines if parties associated to the dossier should also be removed or not. If configured as true, then the DeleteDossier action handling the DELETE_DOSSIER event will, in turn, throw DELETE_PARTY events for every associated party of the dossier. Make sure you have a DeleteParty action configured to listen on the created DELETE_PARTY events in order for the associated parties to be deleted!
  • ASSOCIATED_PARTY_TYPES (only when DELETE_DATA_TYPE=DOSSIER & INCLUDE_PARTIES = true): Can be used to limit the type of associated parties (e.g. only the clients). Default is all associated party types. (recommended)

Example​

{
"identifier": "Scheduled - Dossier Removal",
"state": "ACTIVE",
"healthCheckLevel": 4,
"implementationClass": "eu.myharmoney.app.providers.scheduled.DataRemovalScheduledProvider",
"settings": {
"ASSOCIATED_PARTY_TYPES": [
"CLIENT"
],
"CRON_SCHEDULE": "0 16 * * 7",
"DELETE_DATA_TYPE": "DOSSIER",
"DOSSIER_FILTER": {
"status": [
"ARCHIVED"
]
},
"INCLUDE_PARTIES": true,
"SUPPORTED_FSP": "$vault{<client>_SUPPORTED_FSP}",
"SYSTEM_USER": "$vault{<client>_SYSTEM_USER}"
}
}

Configuring the Custom Action​

For each data type that needs to be removed (dossier, party, …) , you’ll need to configure a predefined custom action. These will do the actual removal of the data in an asynchronous manner.

The actions need to be configured for every FSP definition!

[
{
"type": "EVENT",
"value": "DELETE_DOSSIER",
"className": "eu.myharmoney.app.bll.executors.events.DeleteDossier",
"synchronous": false,
"remove": false
},
{
"type": "EVENT",
"value": "DELETE_PARTY",
"className": "eu.myharmoney.app.bll.executors.events.DeleteParty",
"synchronous": false,
"remove": false
}
]

Settings Configuration