class AAICreateTasks {

    public void createNetworkCollectionInstanceGroup(BuildingBlockExecution execution) {
        try {
            ServiceInstance serviceInstance =
                    extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
            InstanceGroup instanceGroup = serviceInstance.getCollection().getInstanceGroup();
            // set name generated for NetworkCollection/NetworkCollectionInstanceGroup in previous step of the BB flow
            instanceGroup.setInstanceGroupName(execution.getVariable(NETWORK_COLLECTION_NAME));
            // put shell in AAI
            aaiNetworkResources.createNetworkInstanceGroup(instanceGroup);
        } catch (Exception ex) {
            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
        }
    }

}