images

In this chapter, you’ll learn how to create BAM relationships using either the TPE or the BAM API. BAM relationships are used whenever two activities need to be connected by shared data. Usually, the relationship is a one-to-many relationship, such as order header and order detail, or customers and orders.

As an example, consider the manufacturing process at a small specialty manufacturer of custom engine parts that supplies several NASCAR and Formula One teams. Each request for a part is converted by the engineering team into a part itinerary, which describes the steps required to manufacture that part. Each part itinerary contains header information and a series of manufacturing steps. Each manufacturing step contains information on the machine tool to use, the tool settings, and the detailed process for manufacturing the part.

BAM is used to capture information on manufacturing performance. There are two related activities: part and step. The part activity contains the part start time, completion time, and request number for the part. The step activity contains the request number, tool number, manufacturing time, and the status returned by the tool. The request number is shared across the two activities, allowing a BAM relationship to be set up. When a manufacturing step is viewed in the BAM Portal, a link is displayed that allows the user to navigate from manufacturing step to the request header information.

This chapter contains several exercises that cover the following:

  • Creating related activities
  • Examining the sample BizTalk application
  • Creating a tracking profile for related activities
  • Testing the application and capturing data
  • Viewing relation data in SQL Server Management Studio
  • Creating related activities using the BAM API

The Relationship Sample

Arnold, Wilbur, and Olivia (AWO), the specialized construction products company, has diversified into the manufacture of kits for building log cabins. Each kit consists of special hardware that is used to connect lumber together to form a cabin. (It’s assumed the contractor constructing the cabin will provide the sticks.) Because there are a limited number of orders, and lumber size varies, each hardware kit is manufactured to order.

Each order contains a list of the hardware components needed as line items. When the order is received, BizTalk’s XML receive pipeline breaks the interchange into separate messages for each line item; the subscribed send port stores each line item as a separate file.

Because of AWO’s success with BAM in the Straw Bale division, the company has decided to implement BAM in the Log Cabin Hardware division. However, a single activity won’t work to track the set of line items associated with a single order. Instead, two activities will be created: one that stores information from order headers and another that captures information from line items. An obvious relationship exists between these two activities, which is analogous to the foreign key relationship between order headers and order details in a relational database. In this case, instead of a relational database foreign key, the BAM activities are connected by using the BAM concept of a relationship. In this chapter, you will work through several exercises that implement this relationship.

EXERCISE 12-1. CREATING RELATED ACTIVITIES

EXERCISE 12-2. EXAMINING THE SAMPLE BIZTALK APPLICATION

EXERCISE 12-3. CREATING TRACKING PROFILES FOR RELATED ACTIVITIES

EXERCISE 12-4. TESTING THE APPLICATIONN AND CAPTURING DATA

EXERCISE 12-5. VIEWING RELATION DATA IN THE SQL SERVER MANAGER

EXERCISE 12-6. CREATING RELATED ACTIVITIES USING THE BAM API

Summary

In this chapter, you learned two different ways to implement a relationship in BAM: the TPE and the BAM API. Related activities are an important feature of BAM as they allow data to be captured even when it doesn’t fit conveniently into a single table.

Relationships, as you recall, differ from continuations in that relationships span activities, whereas continuations span business processes.

As your BAM solutions grow in breadth, depth, and scope, you’ll find managing BAM from a data flow and solution perspective is key to the success of your implementation. The next chapter will cover an overview of the tools and processes of what you need to know to effectively manage BAM.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset