class NamingServiceCreateTasks {

    public void createInstanceGroupName(BuildingBlockExecution execution) throws BBObjectNotFoundException {
        InstanceGroup instanceGroup = extractPojosForBB.extractByKey(execution, ResourceKey.INSTANCE_GROUP_ID);
        String policyInstanceName = execution.getVariable("policyInstanceName");
        String nfNamingCode = execution.getVariable("nfNamingCode");
        String generatedInstanceGroupName = "";
        try {
            generatedInstanceGroupName =
                    namingServiceResources.generateInstanceGroupName(instanceGroup, policyInstanceName, nfNamingCode);
        } catch (Exception ex) {
            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
        }
        instanceGroup.setInstanceGroupName(generatedInstanceGroupName);
    }

}