Class GenericElementWatchdogGovernanceActionConnector

All Implemented Interfaces:
AuditLoggingComponent, SecureConnectorExtension, VirtualConnectorExtension, WatchdogActionService

public class GenericElementWatchdogGovernanceActionConnector extends GenericWatchdogGovernanceActionConnector
GenericElementWatchdogGovernanceActionConnector is a Watchdog Action Service that listens for changes to open metadata elements and relationships and kicks off a governance action process for each one. With the process-multiple-events request type it runs continuously and does not set up its completion status. This means its engine action is never completed and this service is restarted each time the hosting engine is restarted. With the process-single-event request type it completes once the first matching event is processed.
  • Constructor Details

    • GenericElementWatchdogGovernanceActionConnector

      public GenericElementWatchdogGovernanceActionConnector()
  • Method Details

    • start

      Indicates that the watchdog action service is completely configured and can begin processing. This is a standard method from the Open Connector Framework (OCF) so be sure to call super.start() at the start of your overriding version.
      Overrides:
      start in class WatchdogActionServiceConnector
      Throws:
      ConnectorCheckedException - a problem within the watchdog action service.
      UserNotAuthorizedException - the connector was disconnected before/during start
    • processEvent

      public void processEvent(OpenMetadataOutTopicEvent event) throws GovernanceServiceException
      This method is called each time a potentially new asset is received. It triggers a governance action process to validate and enrich the asset as required. Events are handled one at a time so that, for process-single-event, only one of several events arriving together starts a process.
      Specified by:
      processEvent in class WatchdogActionServiceConnector
      Parameters:
      event - event containing details of a change to an open metadata element.
      Throws:
      GovernanceServiceException - reports that the event can not be processed (this is logged but no other action is taken). The listener will continue to be called until the watchdog governance action service declares it is complete or administrator action shuts down the service.