class CreateNetworkCollection {

    public void connectCollectionToServiceInstance(BuildingBlockExecution execution) throws Exception {
        execution.setVariable("connectCollectionToServiceInstanceRollback", false);
        try {
            ServiceInstance serviceInstance =
                    extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
            Collection networkCollection = serviceInstance.getCollection();
            aaiNetworkResources.connectNetworkCollectionToServiceInstance(networkCollection, serviceInstance);
            execution.setVariable("connectCollectionToServiceInstanceRollback", true);
        } catch (Exception ex) {
            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
        }
    }

}