class AAIUpdateTasks {

    public void updateIpv4OamAddressVnf(BuildingBlockExecution execution) {
        try {
            String ipv4OamAddress = execution.getVariable("oamManagementV4Address");
            if (ipv4OamAddress != null) {
                GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
                GenericVnf copiedGenericVnf = genericVnf.shallowCopyId();

                genericVnf.setIpv4OamAddress(ipv4OamAddress);
                copiedGenericVnf.setIpv4OamAddress(ipv4OamAddress);

                aaiVnfResources.updateObjectVnf(copiedGenericVnf);
            }
        } catch (Exception ex) {
            logger.error("Exception occurred in AAIUpdateTasks updateIpv4OamAddressVnf", ex);
            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
        }
    }

}