class AAICreateTasks {

    public void connectVnfToCloudRegion(BuildingBlockExecution execution) {
        try {
            boolean cloudRegionsToSkip = false;
            String[] cloudRegions = env.getProperty("mso.bpmn.cloudRegionIdsToSkipAddingVnfEdgesTo", String[].class);
            if (cloudRegions != null) {
                cloudRegionsToSkip = Arrays.stream(cloudRegions)
                        .anyMatch(execution.getGeneralBuildingBlock().getCloudRegion().getLcpCloudRegionId()::equals);
            }
            if (!cloudRegionsToSkip) {
                GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
                aaiVnfResources.connectVnfToCloudRegion(vnf, execution.getGeneralBuildingBlock().getCloudRegion());
            }
        } catch (Exception ex) {
            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
        }
    }

}