class AAIUpdateTasks {

    public void updateContrailServiceInstanceFqdnVfModule(BuildingBlockExecution execution) {
        try {
            String contrailServiceInstanceFqdn = execution.getVariable("contrailServiceInstanceFqdn");
            if (contrailServiceInstanceFqdn != null) {
                VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID);
                GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
                vfModule.setContrailServiceInstanceFqdn(contrailServiceInstanceFqdn);
                aaiVfModuleResources.updateContrailServiceInstanceFqdnVfModule(vfModule, vnf);
            }
        } catch (Exception ex) {
            logger.error("Exception occurred in AAIUpdateTasks updateContrailServiceInstanceFqdnVfModule", ex);
            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
        }
    }

}