22
Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007 Microsoft ® Virtual Labs

Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

Microsoft® Virtual Labs

Page 2: Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

Table of Contents

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

......................................................................................................................................................... 1

Exercise 1 Connect to AdventureWorksDW Database.................................................................................................. 2

Exercise 2 Define Entities, Methods, and Filters ........................................................................................................... 5

Exercise 3 Define an IDEnumerator .............................................................................................................................. 6

Exercise 4 Define Actions ............................................................................................................................................. 7

Exercise 5 Define Associations ..................................................................................................................................... 8

Exercise 6 Register AdventureWorksDW in the Business Data Catalog ...................................................................... 9

Exercise 7 Create a Reseller Explorer application (with no code) ............................................................................... 13

Exercise 8 Create a SharePoint list to track reseller feedback ..................................................................................... 17

Conclusion ................................................................................................................................................................... 20

Page 3: Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

Page 1 of 20

Getting Started with the Business Data

Catalog in Microsoft Office SharePoint

Server 2007

Objectives After completing this lab, you will be better able to:

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.

Scenario 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.

Estimated Time to Complete This Lab

90 Minutes

Computer used in this Lab LITWAREINC

Page 4: Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

Page 2 of 20

Exercise 1 Connect to AdventureWorksDW Database

Scenario 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.

Tasks Detailed Steps

Complete the following

task on:

LITWAREINC

1. Create the base XML

for the LobSystem

object.

Note: Login using the following credentials:

Username: administrator

Password: pass@word1

Log on to: LITWAREINC

Note: Notice that this creates connection information for the AdventureWorksDW

database.

a. Wait for the Warmup Script to complete and the popup window to close.

b. Open Microsoft Visual Studio 2005 from the desktop shortcut

c. Select File | New | File.

d. Select XML File and click Open

Page 5: Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

Page 3 of 20

Tasks Detailed Steps

e. Select File | Save XMLFile1.xml As… (make sure XMLFile1.xml is the active

tab)

f. Save the file to C:\HOL\BDC\BDCAWDW.xml

g. Use Ctrl-A to select all the default text

h. Right-click in the window and choose Insert Snippet…

i. From the selection box, choose BDC > LOB XML

Page 6: Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

Page 4 of 20

Tasks Detailed Steps

j. Select File | Save BDCAWDW.xml

Page 7: Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

Page 5 of 20

Exercise 2 Define Entities, Methods, and Filters

Scenario 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.

Tasks Detailed Steps

Complete the following

task on:

LITWAREINC

1. Define Entities

Note: 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.

a. Highlight the line <!-- BDC Entities here -->

b. Right-click and choose Insert Snippet…

c. Choose BDC > Entities

d. Select File | Save BDCAWDW.xml

Page 8: Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

Page 6 of 20

Exercise 3 Define an IDEnumerator

Scenario 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.

Tasks Detailed Steps

Complete the following

task on:

LITWAREINC

1. 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

a. Scroll to the bottom of the BDCAWDW.xml file

b. Highlight the line <!--BDC ResellerIDEnumerator Here -->

c. Right-click and choose Insert Snippet…

d. Choose BDC > ResellerIDEnumerator

e. Select File | Save BDCAWDW.xml

Page 9: Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

Page 7 of 20

Exercise 4 Define Actions

Scenario 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.

Tasks Detailed Steps

Complete the following

task on:

LITWAREINC

1. Add an action to the

Reseller entity

Note: 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.

a. Highlight the line <!--BDC Reseller Actions Here -->

b. Right-click and choose Insert Snippet…

c. Choose BDC > Reseller Actions

d. Select File | Save BDCAWDW.xml.

Page 10: Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

Page 8 of 20

Exercise 5 Define Associations

Scenario 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.

Tasks Detailed Steps

Complete the following

task on:

LITWAREINC

1. Add a pair of

associations which

refine the

relationship between

the Product,

ProductCategory,

and

ProductSubCategory

entities

a. Highlight the line <!--BDC Associations Here -->

b. Right-click and choose Insert Snippet…

c. Choose BDC > Associations

d. Select File | Save BDCAWDW.xml

e. Close Visual Studio 2005.

Page 11: Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

Page 9 of 20

Exercise 6 Register AdventureWorksDW in the Business Data Catalog

Scenario 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.

Tasks Detailed Steps

Complete the following 2

tasks on:

LITWAREINC

1. Create a Business

Data Catalog

Application

a. Open SharePoint 3.0 Central Administration from the Start Menu ->

Administrative Tools.

b. Navigate to the Application Management page.

c. In the Office SharePoint Server Shared Services section of the Application

Management page, click Create or configure this farm’s shared services.

d. Select SharedServices1 (Default) to access the Shared Service Provider (SSP).

e. In the Business Data Catalog section, click Add Application to open the Add

Application page.

Page 12: Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

Page 10 of 20

Tasks Detailed Steps

f. In the Add Application page, browse to “C:\HOL\BDC\BDCAWDW.xml”, and

click Import.

g. Wait for the import to complete – this may take several minutes. You will see

progress screens which load every few seconds.

h. Once the import is complete, you will receive a status page. Ignore any warnings

that may appear and click OK

i. The details page for the new Application will be displayed.

Page 13: Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

Page 11 of 20

Tasks Detailed Steps

2. Set permissions on

the created entities.

a. Scroll down the page and you will see a list of the defined entities for this

application

b. 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

c. On the Manage Permissions page, choose Add Users/Groups

Page 14: Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

Page 12 of 20

Tasks Detailed Steps

d. On the Add Users/Groups page, use the following values:

• Users/Groups: NT AUTHORITY\authenticated users

• Choose Permissions: View Items, Selectable in Clients

e. Click Save

f. Use the site breadcrumb to return to the Application page

g. Repeat the permission setting steps for the rest of the defined entities

h. Congratulations, you’ve registered AdventureWorksDW, exposed its data to

SharePoint Server 2007, and allowed user access.

Page 15: Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

Page 13 of 20

Exercise 7 Create a Reseller Explorer application (with no code)

Scenario 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.

Tasks Detailed Steps

Complete the following 2

tasks on:

LITWAREINC

1. Create the

SharePoint site

where you’ll build

Reseller Explorer

a. Click on the home menu button in Internet Explorer to return to the portal

homepage

b. Click Create Site in the Site Actions menu at the top right

c. Use the following values

• Title: Reseller Explorer

• URL name: resellerexplorer

• Template Selection: Blank Site

d. Click Create

2. Add a Business Data

List Web Part Note: 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.

a. 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.

Page 16: Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

Page 14 of 20

Tasks Detailed Steps

b. Click Add a Web Part in the Left zone.

c. The “Add Web Parts - Web Page” dialog is displayed. Check Business Data

List and click Add.

d. A Business Data List Web Part has been added. Click Open the tool pane inside

the Business Data List Web part.

e. Click the Browse icon which looks like an open book

f. Double-click on Reseller from the popup window

g. Expand the Appearance section.

h. Replace Business Data List in the Title field with Resellers from

AdventureWorksDW

Page 17: Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

Page 15 of 20

Tasks Detailed Steps

i. Click OK at the bottom of the tool pane.

j. You have now created a Business Data List Web Part that displays resellers from

the AdventureWorksDW database.

k. Click on Retrieve Data

l. Click on the Name of the first item in the list

m. You are taken to the Reseller Details page. This page is created automatically for

each Business Data Catalog entity

Page 18: Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

Page 16 of 20

Tasks Detailed Steps

n. Click the browser back button to return to the Reseller Explorer page

o. Hover over the first name entry and examine the items in the drop down list

p. 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.

Page 19: Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

Page 17 of 20

Exercise 8 Create a SharePoint list to track reseller feedback

Scenario 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.

Tasks Detailed Steps

Complete the following

task on:

LITWAREINC

1. Create the Reseller

Feedback list

a. Click Create in the Site Actions menu at the top right. The Create Page page

appears.

b. Click Custom List in the Custom Lists section. The New page appears.

c. Type Reseller Feedback in the Name field and click Create. The Reseller

Feedback list appears.

d. Click Settings on the list toolbar and select Create Column. The New Column

page appears.

Page 20: Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

Page 18 of 20

Tasks Detailed Steps

e. Use the following values:

• Column name: Reseller

• The type of information in this column is: Business data

• Type: Reseller (BDCAWDW)

• Add a column to show each of these additional fields: Number

f. Click OK. You return to the list, which now contains the Reseller and the related

Reseller: Number columns

g. Click New on the list toolbar and select New Item. The New Item page appears.

h. Use the following values:

• Title: Can’t withstand rainy Seattle winter

• 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 reseller.

• 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.

Page 21: Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

Page 19 of 20

Tasks Detailed Steps

i. 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.

Page 22: Hol311 Getting%20 Started%20with%20the%20 Business%20 Data%20 Catalog%20in%20 Microsoft%20 Office%20 Sha

Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007

Page 20 of 20

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.