This action might not be possible to undo. Are you sure you want to continue?
HOL311: Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007
2. Technologies Highlighted Microsoft® Office SharePoint® Server 2007 3. Audience Solution Developer – 300 level 4. Scenario
Overview of the Business Data Catalog
The Business Data Catalog is a new business integration feature in Microsoft Office SharePoint Server 2007. It is a core service, and it enables Microsoft Office SharePoint Server 2007 servers to interact with business applications and display business data on the portal without any custom development. The Business Data Catalog bridges the gap between the portal and your business applications and enables you to bring in key data from various business applications to SharePoint sites, lists, search, and user profiles. The Business Data Catalog is essentially a catalog of business applications that are of interest to SharePoint Server 2007 users. It provides out-of-the-box support for displaying data from databases and any business application that provides Web services for retrieving data from the application. For example, using the Business Data Catalog, you can display data from your SAP or Siebel application using web services. The Business Data Catalog is the key infrastructural component around which most of the other business data features of SharePoint Server 2007 are built. Metadata authors with a skill set equivalent to that of an SQL developer describe the application programming interface (API) of business applications by using the Business Data Catalog XML metadata model. Administrators can register business applications in the catalog, after which the data in the business application is immediately available to you on your portal site through several other SharePoint Server 2007 business data features. Following is a brief discussion of these business data features.
Business Data Web Parts
SharePoint Server 2007 ships with four out-of-the-box Business Data Web Parts: Business Data List, Business Data Items, Business
Data Related List, and Business Data Actions. These Web Parts rely on the Business Data Catalog, and their main purpose is to enable you to display business data on your portal without writing any code. Also, these Web Parts are generic and can show any type of data (entity) registered in the Business Data Catalog. These Web Parts support Web Part connections and make it easier to create Master-Detail applications without writing any code. For example, you can display customers and their details using the BusinessDataList and BusinessDataItems Web Parts. Table 1 provides a brief description of the Business Data Web Parts. Table 1. Business Data Web Parts
Web Part Description BusinessDataList Web Part Displays a list of entity instances from a business application registered in the Business Data Catalog. For example, you can use a Business Data List Web Part to display all the customers or orders from the AdventureWorksDW database. BusinessDataItems Web Part Displays the details of an entity instance from a business application. For example, you can use a Business Data Items Web Part to display the details of a particular customer or order from the AdventureWorksDW database. BusinessDataRelatedList Web Part Displays a list of related entity instances from a business application. For example, you can use a Business Data Related List Web Part to display all the orders for a particular customer from the AdventureWorksDW
5. Purpose of Hands-on Lab Lab 1: Build and Register Metadata The objective of this lab is to build the metadata file that will connect SharePoint Server 2007 to the SQL Server 2005 AdventureWorksDW database. Note: A completed copy of the metadata file can be found in C:\HOL\BDC\Reference. Lab 2: Accessing the Business Data Catalog The objective of this lab is to register the AdventureWorksDW metadata file with SharePoint Server 2007. Hands-on Lab
Lab 1: Build and Register Metadata Exercise 1 – Connect to AdventureWorksDW Database A LobSystem object is a source of business data, business logic, or both. SAP R/3 IDES, Siebel 7.5, and Microsoft SQL Server 2005 databases are examples of LobSystem objects. The LobSystem object is the top-level container for metadata that describes a particular business application. In XML terms, it is the root node that contains all other metadata objects. In this exercise, you will configure the connection to the AdventureWorksDW database as a LobSystem object. Create the base XML for the LobSystem object. • Notice that this creates connection information for the AdventureWorksDW database.
• Login using the following credentials: o Username: administrator o Password: pass@word1 o Log on to: LITWAREINC • Wait for the Warmup Script to complete and the popup window to close. • Open Microsoft Visual Studio 2005 from the desktop shortcut • Select File | New | File.
• Select XML File and click Open
• Select File | Save XMLFile1.xml As… (make sure XMLFile1.xml is the active tab) • Save the file to C:\HOL\BDC\BDCAWDW.xml
• Use Ctrl-A to select all the default text • Right-click in the window and choose Insert Snippet…
• From the selection box, choose BDC > LOB XML
• Select File | Save BDCAWDW.xml
Exercise 2 – Define Entities, Methods, and Filters A LOB application registered in the Business Data Catalog defines the entities, the methods that can be executed on the entities and filters to enable end user filtering. An entity is a business object, such as Customer or Product, in an LOB application. Methods are the operations related to an entity and filters help limit the entity instances returned from the method. In Business Data Catalog, an entity belongs to a single LOB system and must have a unique name. Entities contain identifiers, methods, filters and actions. Here you define seven entities – Product, SupportCase, Contact, SupportPerson, ProductSubCategory, ProductCategory, and Reseller. These entities represent the high-level business objects in the AdventureWorksDW database. For the remainder of the lab we’ll be primarily focused on the Reseller entity. This entity has a “ResellerFinder” method to get a list of resellers which includes Wildcard and ExactMatch filters to enable end-user filtering on the Key and Name fields. • Highlight the line <!-- BDC Entities here --> • Right-click and choose Insert Snippet… • Choose BDC > Entities
• Select File | Save BDCAWDW.xml Exercise 3 – Define an IDEnumerator
To enable business data search, you need to define a SpecificFinder and a special type of MethodInstance called IDEnumerator in your metadata. Since you have already defined a SpecificFinder for the Reseller entity in Exercise 2, you will define an IDEnumerator method now. An IDEnumerator method is a simple method that returns the list of IDs (unique keys) for an entity that should be searchable. This enables indexing of the entities for the IDs the IDEnumerator method returns. Entities have zero or one IDEnumerator. The definition for an IDEnumerator is exactly like a Finder method, except that it has zero filters and returns only the ID field or the ID and LastModifiedDate fields. You now define an IDEnumerator to index and search for resellers in the AdventureWorksDW database. Note: If you require incremental crawl, then you must also make sure the LastModifiedDate property is one of the return fields in the SpecificFinder for the entity from the LOB application. Note: This example uses a Microsoft SQL Server 2005 database which supports streaming of data. For Web services and other non-streaming backends, you should use the LastIdSeen filter in your IDEnumerator as shown below to improve performance. For example: SELECT TOP 100 Id FROM Customers WHERE Id>=@LastIdSeen ORDER BY Id • • • • Scroll to the bottom of the BDCAWDW.xml file Highlight the line <!--BDC ResellerIDEnumerator Here --> Right-click and choose Insert Snippet… Choose BDC > ResellerIDEnumerator
• Select File | Save BDCAWDW.xml Exercise 4 – Define Actions Entities can have actions in the Business Data Catalog. Actions bridge the gap between SharePoint Server 2007 and a native application user interface by providing a link back to the backend data source. You can use Business Data Actions to build applications with write-back scenarios, such as a Customer Profile view that allows a user to update profile information directly in SAP. Actions are implemented as links, so you can also use actions to perform simple actions such as send e-mail or open a customer’s home page.
Actions travel everywhere with an entity. That is, once you define an action for an entity, the action will show up everywhere you display that entity - be it in a Business Data Web Part or in a Business Data column. You now add an action to the Reseller entity called 'Search product on Portal'. As the name implies, this action will open up a browser and search for the product name using Search Center in our SharePoint Server 2007 portal. • Highlight the line <!--BDC Reseller Actions Here --> • Right-click and choose Insert Snippet… • Choose BDC > Reseller Actions
• Select File | Save BDCAWDW.xml. Exercise 5 – Define Associations Entities can have associations in the Business Data Catalog. Associations allow Business Data Catalog entities to have a hierarchical relationship, by defining the parent-child relationship and the method used to query for this relationship. You now add a pair of associations which refine the relationship between the Product, ProductCategory, and ProductSubCategory entities • Highlight the line <!--BDC Associations Here --> • Right-click and choose Insert Snippet… • Choose BDC > Associations
• Select File | Save BDCAWDW.xml • Close Visual Studio 2005.
Exercise 6 – Register AdventureWorksDW in the Business Data Catalog In this exercise, you will register the AdventureWorksDW database in SharePoint Server 2007’s Business Data Catalog using the metadata file created in the previous exercises. Once you register AdventureWorksDW, you can use its data throughout the portal – in lists, web parts, search, and user profiles. You’ll explore some of these features in later exercises. In addition, each entity defined in a Business Data Catalog Application can be permissioned separately. Create a Business Data Catalog Application • Open SharePoint 3.0 Central Administration from the Start Menu -> Administrative Tools. • Navigate to the Application Management page.
• In the Office SharePoint Server Shared Services section of the Application Management page, click Create or configure this farm’s shared services.
• Select SharedServices1 (Default) to access the Shared Service Provider (SSP).
• In the Business Data Catalog section, click Add Application to open the Add Application page.
• In the Add Application page, browse to “C:\HOL\BDC\BDCAWDW.xml”, and click Import.
• Wait for the import to complete – this may take several minutes. You will see progress screens which load every few seconds.
• Once the import is complete, you will receive a status page. Ignore any warnings that may appear and click OK • The details page for the new Application will be displayed.
Set permissions on the created entities.
• Scroll down the page and you will see a list of the defined entities for this application
• For each entity, we’ll need to add user access, as the default is no access for anyone other than the administrator. Hover over Contact and choose Manage Permissions from the dropdown menu
• On the Manage Permissions page, choose Add Users/Groups
• On the Add Users/Groups page, use the following values: o Users/Groups: NT AUTHORITY\authenticated users o Choose Permissions: View Items, Selectable in Clients
• Click Save • Use the site breadcrumb to return to the Application page
• Repeat the permission setting steps for the rest of the defined entities • Congratulations, you’ve registered AdventureWorksDW, exposed its data to SharePoint Server 2007, and allowed user access. Lab 2: Accessing the Business Data Catalog Exercise 1 – Create a Reseller Explorer application (with no code) In this exercise, you’ll use the Business Data Web Parts to create an AdventureWorksDW Reseller Explorer application with no code. The application will allow you to search all resellers. By clicking on a reseller name, you’ll be able to view more details on the reseller profile page. Create the SharePoint site where you’ll build Reseller Explorer • Click on the home menu button in Internet Explorer to return to the portal
homepage • Click Create Site in the Site Actions menu at the top right
• Use the following values o Title: Reseller Explorer o URL name: resellerexplorer o Template Selection: Blank Site • Click Create Add a Business Data List Web Part The Business Data List Web Part displays a list of entity instances from a business application registered in the Business Data Catalog. For example, you can use a Business Data List Web Part to display the resellers from the AdventureWorksDW database. This shows how you can add a Business Data List Web Part to display a list of resellers from the AdventureWorksDW database with no code. • Click Edit Page in the Site Actions menu. This puts the page in edit mode and shows controls for adding, removing, and repositioning page elements.
• Click Add a Web Part in the Left zone.
• The “Add Web Parts - Web Page” dialog is displayed. Check Business Data List and click Add.
• A Business Data List Web Part has been added. Click Open the tool pane inside the Business Data List Web part.
• Click the Browse icon which looks like an open book • Double-click on Reseller from the popup window
• Expand the Appearance section. • Replace Business Data List in the Title field with Resellers from
• Click OK at the bottom of the tool pane. • You have now created a Business Data List Web Part that displays resellers from the AdventureWorksDW database. • Click on Retrieve Data
• Click on the Name of the first item in the list
• You are taken to the Reseller Details page. This page is created automatically for each Business Data Catalog entity
• Click the browser back button to return to the Reseller Explorer page • Hover over the first name entry and examine the items in the drop down list
• Notice there are two items, corresponding to the available Actions for the entity. The default View Profile which takes you to the details page, and the custom Search product on Portal which we included in our metadata definition.
Business Data Catalog search is covered in more depth as part of the Search Center lab. Exercise 2 – Create a SharePoint list to track reseller feedback Microsoft Windows SharePoint Services V3 allows you to create custom field types. Microsoft Office SharePoint Server 2007 uses this feature to provide a new field type called Business Data that is available to all lists in SharePoint Server 2007. The Business Data field type enables users to add data from business applications registered in the Business Data Catalog to lists. This topic shows how you can add a Reseller column to a SharePoint list. Create the Reseller Feedback list • Click Create in the Site Actions menu at the top right. The Create Page page appears.
• Click Custom List in the Custom Lists section. The New page appears.
• Type Reseller Feedback in the Name field and click Create. The Reseller Feedback list appears. • Click Settings on the list toolbar and select Create Column. The New Column page appears.
• Use the following values: o Column name: Reseller o The type of information in this column is: Business data o Type: Reseller (BDCAWDW) o Add a column to show each of these additional fields: Number • Click OK. You return to the list, which now contains the Reseller and the related Reseller: Number columns • Click New on the list toolbar and select New Item. The New Item page appears.
• Use the following values: o Title: Can’t withstand rainy Seattle winter o Reseller: Volume Bike Sellers chosen in one of these ways: Type Bike in the Reseller field and click the Check Names icon. bike is underlined in red and a message is displayed: No exact match was found. Click bike and choose the
Click the Browse icon, choose Name in the search dropdown, type bike in the search box, and click the magnifying glass button. Select the reseller from the search results box.
• Click OK. The new list item appears with the reseller name and number. The reseller name item also includes the drop down menu of all the available Business Data Catalog actions for the reseller entity.
Conclusion I. Conclusion In this lab you learned about some of the available options in the new Business Data Catalog in Microsoft Office SharePoint Server 2007. You walked through the process of creating a new metadata definition, deploying the application, using the provided Business Data Catalog Web Parts, and including Business Data in SharePoint lists.
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue reading from where you left off, or restart the preview.