class AAIDeleteTasks {

    public void deleteVfModule(BuildingBlockExecution execution) throws Exception {
        GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
        VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID);

        execution.setVariable("aaiVfModuleRollback", false);
        try {
            aaiVfModuleResources.deleteVfModule(vfModule, genericVnf);
            execution.setVariable("aaiVfModuleRollback", true);
        } catch (Exception ex) {
            logger.error("Exception occurred in AAIDeleteTasks deleteVfModule process", ex);
            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
        }
    }

}