class AAIDeleteTasks {

    public void deleteInstanceGroup(BuildingBlockExecution execution) throws Exception {
        try {
            ServiceInstance serviceInstance =
                    extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
            aaiNetworkResources.deleteNetworkInstanceGroup(serviceInstance.getCollection().getInstanceGroup());
        } catch (Exception ex) {
            logger.error("Exception occurred in AAIDeleteTasks deleteInstanceGroup process", ex);
            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
        }
    }

}