class ASDCStatusCallBack implements IStatusCallback {

    @Override
    public void activateCallback(IStatusData iStatus) {
        String event = "Receive a callback componentStatus in ASDC, for componentName: " + iStatus.getComponentName()
                + " and status of " + iStatus.getStatus() + " distributionID of " + iStatus.getDistributionID();

        try {

            if (iStatus.getStatus() == null) {
                logger.info("Missing status on Status Object. ");
                return;
            }
            if (!iStatus.getStatus().equals(DistributionStatusEnum.COMPONENT_DONE_OK)
                    && !iStatus.getStatus().equals(DistributionStatusEnum.COMPONENT_DONE_ERROR)) {
                logger.info("Status is not 'Component Done OK' or 'Component Done Error'");
                return;
            }
            WatchdogDistributionStatus watchdogDistributionStatus =
                    watchdogDistributionStatusRepository.findById(iStatus.getDistributionID()).orElseGet(() -> null);
            if (watchdogDistributionStatus == null) {
                watchdogDistributionStatus = new WatchdogDistributionStatus();
                watchdogDistributionStatus.setDistributionId(iStatus.getDistributionID());
                watchdogDistributionStatusRepository.save(watchdogDistributionStatus);
            }
            logger.debug(event);
            toscaInstaller.installTheComponentStatus(iStatus);

        } catch (ArtifactInstallerException e) {
            logger.error("Error in ASDCStatusCallback {}", e.getMessage(), e);
            logger.debug("Error in ASDCStatusCallback {}", e.getMessage());
        }
    }

}