Class PasteurActionHistoryCleanupConnector

All Implemented Interfaces:
AuditLoggingComponent, SecureConnectorExtension, VirtualConnectorExtension, IntegrationConnector

public class PasteurActionHistoryCleanupConnector extends IntegrationConnectorBase
PasteurActionHistoryCleanupConnector keeps the action history of the open metadata ecosystem in check, in recognition of Louis Pasteur (1822-1895), whose work on germ theory and vaccination defeated infectious diseases. Every engine action, governance action process instance, to do and other kind of action stays in the repository after it finishes, so without housekeeping the action history grows without bound.

On each refresh the connector looks, type by type, for the actions of each type listed in its daysToCleanUp configuration property whose activity status is one of its completionStatuses, and deletes those that completed at least the configured number of days ago (see PasteurCleanUpPolicy). It uses the LOOK_FOR_LINEAGE delete method by default: an action with lineage relationships is archived, so it is still available to lineage queries, and the others are soft-deleted. Neither is a purge, so an action removed in error can be restored. The deleteMethod configuration property can name a different delete method. The delete is cascaded, so the elements anchored to an action go with it.

An action anchored to another action whose type has its own entry in daysToCleanUp - typically the engine actions of a governance action process, which are anchored to the process instance - is left for the delete of its anchor to remove. That way a process instance and the engine actions it ran are removed together rather than the engine actions disappearing from under a process instance that is still being kept.