class AAIDeleteTasks {

    public void deleteVnf(BuildingBlockExecution execution) throws Exception {
        GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);

        execution.setVariable("aaiVnfRollback", false);
        try {
            aaiVnfResources.deleteVnf(genericVnf);
            execution.setVariable("aaiVnfRollback", true);
        } catch (Exception ex) {
            logger.error("Exception occurred in AAIDeleteTasks deleteVnf process", ex);
            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
        }
    }

}