38
Module 12: Enabling Business Activity Monitoring Time estimated: 90 minutes Module objective: In this module, you will learn how to monitor business activity by using Business Activity Monitoring (BAM). Overview Getting the correct information at the correct time is of critical importance to any business. Business deals and partnerships are often made or broken solely over questions of information access. The decisive advantage frequently goes to the business that is armed with the best information. The Business Activity Monitoring (BAM) Framework in Microsoft® BizTalk® Server gives you just such an indispensable advantage. By opening a real-time window into running business processes,

Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

Module 12: Enabling Business Activity MonitoringTime estimated: 90 minutes

Module objective:In this module, you will learn how to monitor business activity by using Business Activity Monitoring (BAM).

OverviewGetting the correct information at the correct time is of critical importance to any business. Business deals and partnerships are often made or broken solely over questions of information access. The decisive advantage frequently goes to the business that is armed with the best information.

The Business Activity Monitoring (BAM) Framework in Microsoft® BizTalk® Server gives you just such an indispensable advantage. By opening a real-time window into running business processes, BAM provides business analysts with a direct view of transactions as those transactions occur—a view that has traditionally been unavailable.

Page 2: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

Lesson 1: Introduction to Business Activity Monitoring

Lesson objective:

Explain Business Activity Monitoring and why it can be an important feature of BizTalk Server solutions.

Page 3: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

Gaining Visibility into Business Processes

Describe how BAM is used to gain visibility into running business processes.

OverviewBusiness Activity Monitoring (BAM) is a tool for monitoring and analyzing data from business process information sources. The data is presented in a real-time view of business state, trends, and critical conditions. BAM’s open application programming interface (API) can be used to gain visibility into data external to BizTalk processes, such as archival data or other non-BizTalk processes and systems. BAM gives business analysts the data they need when they need it, enabling them to make better business decisions based on more relevant data.

BAM provides interceptors that can gather data from messages as they are received and from any point within the business process, such as an orchestration, pipeline, or message type. BAM also provides auditing capabilities by being able to answer the how and why behind business decisions.

BAM allows you to determine how your business is performing by answering questions such as:

1. How long did it take for this process to be approved?

2. How quickly was this order filled after it was received?

3. How many process cycles occurred in the last month? In the last year?

Page 4: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

4. How many purchase orders were processed last week?

5. How much is our total revenue this year so far?

By aggregating data, BAM provides an overview of trends experienced in the business while allowing users to examine individual instances. You can also use BAM to link together various messages as they travel through the system to create a unified BAM view, which gives visibility of the entire business process, spanning multiple orchestrations and even including data external to BizTalk. This visibility is tremendously beneficial for making critical business decisions.

BizTalk administrators sometimes use BAM to gather and monitor IT operations data in addition to monitoring business data. Using BAM to monitor IT operations can be particularly useful when supporting Service Level Agreements.

Page 5: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

What Is Business Activity Monitoring (BAM)?

Give a brief introduction of Business Activity Monitoring and the business value that it provides.

OverviewBAM makes it possible for developers, business analysts, and end users, working individually or collaboratively, to extract the data they need from their business processes.

To gather the necessary business data for business analysts to make decisions regarding business processes, the business analyst and developer will need to work together to create one or more BAM activities. BAM activities represent a unit of work in a business, such as processing a purchase order or a loan application. Activities are used to show the history, or milestones, and data about a unit of work to the business analysts. BAM activities are independent of the actual implementation of your BizTalk Server solution. Think of a BAM activity as a record in a SQL table that you are keeping in synchronization with the actual unit of work. You can relate multiple BAM activities together as well. An example of relating activities would be a situation in which a single purchase order contains multiple shipments. Properly configured BAM activities can allow business users to look at a purchase order and be able to see shipping information for each item in the purchase order. Developers can use the BAM API to create BAM activities that span multiple disparate systems. For example, if one step in a loan process is to execute a Web service or make a call to a mainframe system, business analysts can include this data in their analysis. BAM activities can also contain milestones (a date/time measure) throughout the business

Page 6: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

process that allow business analysts to see the overall progress of the process and investigate each individual step of the process.

Key performance indicators (KPIs) allow business analysts to view specific pieces of data in a business process.

Business analysts can also define views to specify how the activity data will be displayed. Views can be used to filter the data from BAM. This can be useful if analysts want to see loans that were processed from a certain state or by a certain loan officer or between two dates. Filtering allows business analysts to focus only on the data they need to answer questions on how their business is performing. BAM databases can be shared across BizTalk Server groups to present an aggregated view of a business process.

Additionally, BAM views can be used to secure and filter information for different audiences.

Who Does What? Business analysts use the Microsoft Office Excel® BAM Design Workbook to define the

business requirements for BAM activities and views. IT professionals use the BAM Manager to deploy the business requirements into the BAM

databases. Developers map the business processes to run-time components by using the Tracking

Profile Editor (TPE) for BizTalk Server. Anyone interested in the collected data—developers, IT professionals, business analysts, and

end users—can use the BAM Portal to view, aggregate, search, or create alerts based on the data collected by BAM.

Page 7: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

Business Activity Monitoring Components

Describe the components of the Business Activity Monitoring Framework.

OverviewThe Business Activity Monitoring Framework includes interceptors for both pipelines and orchestrations. These interceptors retrieve specific data as it is being processed and send the data to the Primary Import database. The other components that BAM utilizes include:

BizTalk Primary Import database. This database acts as the principal collection point for real-time data collected by the BAM interceptors. This database contains stored procedures, tables, triggers, and views that are dynamically generated based on the BAM Definition Workbook. Data for a specified database is maintained in the Primary Import tables and is then moved to the archive database.

BAM activity aggregations and OLAP cubes. The activity aggregations are maintained in the form of online analytical processing (OLAP) cubes, which are dynamically generated, along with the necessary Data Transformation Services (DTS) packages and a staging database for non-real-time data.

Real-Time Aggregations (RTA). These are special tables, created in the Primary Import database, that have triggers that are used to maintain the aggregations synchronously with the incoming events.

Page 8: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

BAM interceptors. The collection of data (message context properties and message data) from orchestrations and pipelines is implemented as BAM interceptors. These interceptors monitor the data as it is being processed and collect information that has been identified as being a KPI. No programming is required to change the BAM tracking.

Tracking Profile Editor (TPE). Developers use the TPE to define the mapping of orchestration actions to business milestones and the mapping of XML schema nodes to the business data items. Because no programming is required to collect or modify this data, changes to tracking can be made easily at any time.

Page 9: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

Lesson 2: Enabling Business Activity Monitoring

Lesson objective:

Explain the steps required to successfully implement Business Activity Monitoring.

Page 10: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

Enabling Business Activity Monitoring (Analyst)

Describe the role of the business analyst in enabling Business Activity Monitoring.

OverviewThe creation and implementation of BAM to monitor business processes usually involves several different roles with different skill sets and tools.

Business Analyst RoleThe role of the business analyst is to create BAM activity definitions (activities) and to create the views that will be available to end users to view the business processes. Generally, Business Analysts do not know, and do not need to know, what the actual orchestration that defines the business process looks like. They know what information is important to track and the order in which the process occurs.

Create ActivityAnalysts use Microsoft Excel 2010 to create activities that identify in list form the key performance indicators (KPIs) of the business processes, for example, receiving and processing a purchase order (PO). These activities will include milestones (a date/time measure for the receipt of a PO or the sending of an invoice) in addition to data points of interest, such as the order date, PO number, total, and discounted total amounts. These data points might be of interest for tracking and auditing purposes.

Page 11: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

Enabling Business Activity Monitoring (Administrator)

Describe the role of the system administrator in enabling Business Activity Monitoring.

System Administrator RoleThe role of the system administrator in enabling BAM is limited to deploying the workbook or BAM activity definition file into the production environment by using the BAM Management tool (BM.exe). When the definition is deployed, the BAM database infrastructure is generated dynamically based on the activity defined in the workbook.

ExampleIn the following example, the SalesManagerView workbook is being deployed to create the database structure based on the activity defined in the workbook.

BM deploy-all -DefinitionFile:SalesManagerView.xls

The BAM Management tool enables administrators to view, add, update and remove BAM Management data.

Page 12: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

Enabling Business Activity Monitoring (Developer)

Describe the role of the developer in enabling Business Activity Monitoring.

Tracking Profile Editor (TPE)The Tracking Profile Editor (TPE) is a graphical user interface used by developers to create and modify the tracking profiles that map a specific view of internal business processes and associated data to a business process that might be represented by one or more orchestrations.

When you use the TPE to create a tracking profile, you create or load a profile that will define the relationship between:

1. One or more BizTalk assemblies that have been deployed to the BizTalk Configuration database; each assembly may contain one or more orchestrations, pipelines, schemas, and property schemas.

2. The activity, created by the business analyst, that has been deployed to the tracking database by the use of the BAM Management command-line tool.

If you have multiple BAM activities deployed, you can use the TPE to create links of continuations between the activities. Linking BAM activities brings together the business analyst’s view of the process with the real-world implementation of that process as a group of orchestrations.

Page 13: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

The process of creating the mapping involves a drag-and-drop operation in which the orchestration shape that maps to a particular KPI (a milestone, for example) is dragged from the right pane to the corresponding KPI in the left pane. Similarly, messages (as represented by send and receive shapes) can be examined for the data that is of interest (PO number or order date, for example) and dropped onto the corresponding node in the left pane.

After you have identified all the points in the activity, you will apply the activity. The collection of data begins immediately after the activity is applied. As long as the activity file does not change, it is possible to modify how the data is collected and where it is collected from. For example, if the business process changes and what used to be done in one orchestration is now done in two, the profile can be updated and the data will now be collected from the new shapes. This allows for mapping information over extended periods of time into a single database to provide powerful aggregations.

Page 14: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

What Is the BAM Portal?

Explain the purpose and use of the BAM Portal.

BAM PortalThe BAM Portal is a tool in BizTalk Server 2010 that is used to view data collected in the BAM databases from a business process. When the model is deployed by using the BAM Manager, the views included in the data collection model are rendered as views for the BAM Portal. The BAM Portal is a Microsoft ASP.NET application (it does not rely on Windows SharePoint Foundation). For companies that already have SharePoint sites, Web parts are available to simplify integration of BAM data into those sites.

The BAM Portal gives you the ability to:

Access pre-created views of the business data created by the business analyst and work with PivotTables® in real time. In this way, users can customize the view to their own preferences.

Perform activity searches against BAM data to find specific BAM activity. For example, the preceding slide shows sales manager data for the OrderMgmt application. Queries can be saved and reused. They can also be the basis for an alert, such as notification when a purchase order arrives from the specified customer.

Drill down to see detailed information. This example shows the activity status for the city of Los Angeles. The Activity Status view shows the dates on which several business milestones were reached and tracking information (the Activity ID), in addition to the other data. With

Page 15: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

this functionality, it is easy to start with aggregated data (all orders processed) and see the details for orders that make up the totals.

Configure and share alerts to notify specific users in the event that particular threshold conditions are met—for example, if the number of unprocessed purchase orders exceeds 100, send an e-mail message to the sales manager. Once created, alerts can be subscribed to by other users who are interested in the same information.

Escalate issues to the systems administrator. A link is provided to send feedback to a preconfigured e-mail address notifying the recipient of problems that are identified by portal users.

Page 16: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

Demonstration: Monitoring Business Activity

Learn to implement an existing Business Activity Monitoring activity for a BizTalk Server solution.

Install the OrderMgmt Application1. Start the bt10d-demos virtual machine.

2. In Windows Explorer, navigate to C:\AllFiles, and double-click startBtServices.cmd.

3. In Windows Explorer, navigate to C:\AllFiles\DemoCode\Module12, and double-click BAMSetup.cmd.

Deploy the BAM View Created by the Business Analyst1. On the Start menu, click Run.

2. In the Open box, type cmd, and then press ENTER.

3. In the command prompt window, type cd “\Program Files (x86)\Microsoft BizTalk Server 2010\Tracking”, and then press ENTER.

4. In the command prompt window, type the following command (all on one line), and then press ENTER.

bm deploy-all -DefinitionFile:C:\AllFiles\DemoCode\Module12\OrderMgmt.xml

Page 17: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

5. When the command completes, close the command prompt window.

Prepare for BAM Data Collection1. On the Start menu, click All Programs, click Microsoft BizTalk Server 2010, and then

click Tracking Profile Editor.

2. On the File menu, click Open, and then navigate to and open C:\AllFiles\DemoCode\Module12\OrderMgmt.btt.

3. In the left pane of the Tracking Profile Editor, expand City, and then click the City sub-node.

BAM intercepts individual pieces of information during the execution of the BizTalk processes and writes this information to the Tracking database. The City is retrieved from the original Purchase Order because it is initially received in the orchestration.

4. In the left pane, expand approved, and then click FulfillmentDelay.

Notice that the approved milestone in the observation model is linked to the Fulfillment Delay shape in the BizTalk orchestration.

5. On the Tools menu, click Apply Tracking Profile.

Although the observation model has been deployed, it is necessary to apply the mappings between the logical model and the actual orchestration.

6. In the Tracking Profile Editor dialog box, click OK.

7. Close the Tracking Profile Editor.

Test BAM Functionality1. In Windows Explorer, double-click C:\AllFiles\DemoCode\Module12\Send20POs.bat.

2. In Microsoft Internet Explorer®, browse to http://localhost:8080/BAM.

3. In the My Views task pane, expand Aggregations, and then click Order Progress.

4. In the message box, read the warning, and then click OK.

5. Because SQL Analysis Services caches the BAM data that it receives from BizTalk, it may take 1 to 2 minutes for the data to appear in the Pivot Table View. Click the red exclamation point (!) to refresh the view

The Evaluation cells might not always be visible. The orders in Evaluation have been received, but have not yet been approved or denied.

6. Notice the relationship between the data in the graph and the PivotTable.

7. In Windows Explorer, double-click C:\AllFiles\DemoCode\Module12\Send20POs.bat.

8. Switch back to Internet Explorer and click the PivotTable toolbar button with the red exclamation point (!) icon to refresh the data.

9. Expand the Received, Approved, and Evaluation cells to show the status of the various completed processes.

The Evaluation cells might not always be visible. The orders in Evaluation have been received but not yet approved or denied.

Page 18: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

10. Notice that the counts have increased.

11. In the PivotTable, right-click the cell that contains the total count for Approved, and then click Show Results.

12. Click any link in the City column.

13. In the My Views task pane, click OrderMgmt.

14. In the Query section, in the Business Data list, click City.

15. In the Value box, type LosAngeles.

16. In the Column Chooser section, select all the data and milestones, and then click Add (>>).

17. Click Execute Query.

The details for each order in which the City was LosAngeles are displayed.

18. Double-click any row in the Results section, and then notice that the level of detail is the same as was seen previously.

19. Close all windows, and shut down the bt10d-demos virtual machine.

Page 19: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

Lab: Monitoring Business Activity

Time estimated: 45 minutes

ScenarioBusiness Activity Monitoring (BAM) is a tool designed to be used by business analysts for gathering business data from both archived and running business processes. In this lab, you will see how to use several new tools, including the Microsoft Excel Business Activity Monitoring Add-In and the BAM Portal, for analyzing business data that was processed by BizTalk Server.

Page 20: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

Start the Virtual MachineProcedure List

1. If the Server Manager window is not already open, click on the Server Manager icon located in the task bar next to the Start button.

2. Expand Roles, Hyper-V, Hyper-V Manager. The last node to appear displays the machine name. Click on it to see the list of virtual machines available.

3. Double-click the virtual machine bt10d-12 to open a Virtual Machine Connection window.

4. Click on the Action menu in the Virtual Machine Connection window and choose Start.

5. Once the virtual machine starts, press CTRL+ALT+END.

6. Log on using the user name Administrator and the password pass@word1.

7. At the Windows Activation prompt, click Ask Me Later, then click OK.

Ensure that the BizTalk Services are startedProcedure List

8. In Windows Explorer, navigate to C:\AllFiles.

9. Double click startBtServices.cmd.

10. When prompted, press any key to close the command-line window.

Page 21: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

Exercise 1: Define a Business Activity

OverviewA business activity specifies the data from the business process that is captured by BAM. This data may come from message content, message context, orchestrations, and other sources. Once the business analyst has finished specifying the data to be gathered, the business activity is exported to a BAM Definition File. In this exercise, you will use the Business Activity Monitoring Add-In for Excel to specify the initial data to be collected as each purchase order is processed by the system.

Define MilestonesProcedure List

1. On the Start menu, click All Programs, click Microsoft Office, and then click Microsoft Excel 2010. In the Microsoft Office Activation Wizard window, click Cancel.

2. On the File menu, click Options

3. In the Excel Options window, in the left pane, click Add-Ins.

4. In the right pane, at the bottom, in the Manage list, click Excel Add-ins, then click Go.

5. In the Add-Ins dialog box, click Browse, and navigate to C:\Program Files (x86)\Microsoft BizTalk Server 2010\ExcelDir, then click Bam.xla and click OK.

6. In the Add-Ins dialog box, in the Add-Ins available list, ensure that the Business Activity Monitoring box is checked, and then click OK.

7. In the Excel menu ribbon, on the Add-Ins tab, click BAM, and then click BAM Activity.

8. In the Business Activity Monitoring Activity Definition dialog box, click New Activity.

9. In the Activity name box, enter OrderMgmt.

10. Click New Item, and in the New Activity Item dialog box, in the Item name box, enter received, in the Item type list, click Business Milestones then click OK.

This milestone allows a timestamp value to be gathered from the message after the message is received by the business process.

Page 22: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

11. Repeat step 9, substituting in the following values to create the remaining Activity Items needed to monitor the OrderMgmt business process.

Item Name Item type

denied Business Milestones

approved Business Milestones

acknowledged Business Milestones

City Business Data - Text

State Business Data - Text

Product Business Data - Text

Amount Business Data - Decimal

Later in this lab, you will specify the points in the business process at which each of these data values will be collected by the BAM infrastructure.

12. Click OK twice.

Page 23: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

Exercise 2: Define an Observation ModelThe BAM definition that you initialized in the preceding exercise specifies the information to be collected by BAM. In this exercise, you will create a BAM view. You will design this view by adding progress dimensions and measures that categorize the data gathered by the BAM activity. The data in the view is displayed as a Microsoft Office Excel PivotTable.

Create the Order Progress DimensionProcedure List

1. On the Welcome to the Business Activity Monitoring View Creation page, click Next.

2. On the BAM View page, click Create a new view, and then click Next.

3. In the View name box, type SalesManager, select the Select all activities check box, and then click Next.

This view will contain data most likely needed by a sales manager for daily, weekly, or monthly reports. A BAM view can be thought of as similar to a Microsoft SQL Server view in which you see only the data you need to see.

4. On the New BAM View: View Items page, select the Select all items check box, and then click Next.

5. On the New BAM View: View Items page, review the aliases listed.

6. Click New Duration.

When a message is received, it is in the evaluation stage. After evaluation, it is either approved or denied. If approved, two serial processes occur so that an instance is either in the fulfillment stage or the fulfillment has occurred and a delivery notification has been received. The sales manager is interested in how many messages are in each phase, and therefore, this view is created to summarize this data.

7. In the Duration Name box, type CycleDuration.

8. In the Start business milestone list, click received (OrderMgmt).

9. In the End business milestone list, click acknowledged (OrderMgmt).

10. In the Time resolution list, click Minute, and then click OK.

11. On the New BAM View: View Items page, click Next.

12. On the New BAM View: Aggregation Dimensions and Measures page, click New Dimension.

13. In the New Dimension dialog box, type OrderProgress as the Dimension Name, in the Dimension Type list, click Progress Dimension, and then click New Milestone.

14. In the New Progress milestone dialog box, in the Progress milestone box, type Received, in the Business milestone list, click received (OrderMgmt), and then click OK.

15. In the New Dimension dialog box, in the Progress milestones and stages section, click Received, and then click New Stage.

16. In the New Progress Stage dialog box, in the Progress Stage field, type Evaluation, and then click OK.

Page 24: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

17. Click Evaluation, and then click New Milestone.

18. In the New Progress Milestone dialog box, in the Progress milestone box, type Approved, in the Business milestone list, click approved (OrderMgmt), and then click OK.

19. Click Approved, and then click New Milestone.

20. In the New Progress Milestone dialog box, in the Progress milestone box, type Denied, in the Business milestone list, click denied (OrderMgmt), and then click OK.

21. In the New Dimension dialog box, in the Progress milestones and stages section, click Approved, and then click New Stage.

22. In the New Progress Stage dialog box, in the Progress stage box, type Fulfillment, and then click OK.

23. Click Fulfillment, and then click New Milestone.

24. In the New Progress Milestone dialog box, in the Progress milestone box, type DeliveredAck, in the Business milestone list, click acknowledged (OrderMgmt), and then click OK.

25. In the New Dimension dialog box, in the Progress milestones and stages section, click Denied, and then click New Stage.

26. In the New Progress Stage dialog box, in the Progress stage box, type Contacting, and then click OK.

27. Click Contacting, and then click New Milestone.

28. In the New Progress Milestone dialog box, in the Progress milestone box, type DeniedAck, in the Business milestone list, click acknowledged (OrderMgmt), and then click OK.

Screen shot of the completed New Dimension dialog

Page 25: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

29. In the New Dimension dialog box, click OK.

Create the Count MeasureProcedure List

1. On the New BAM View: Aggregation Dimensions and Measures page, click New Measure.

In the following steps, you will configure the Count aggregation type, which will count all order activities passing through the system.

2. In the New Measure dialog box, in the Measure name box, type Count.

3. Click Count in the Aggregation Type section, and then click OK.

This will automatically select the OrderMgmt activity as the base data item because it will be a count of all order activities passing through the system.

Create the AvgCycleDuration MeasureProcedure List

1. On the New BAM View: Aggregation Dimensions and Measures page, click New Measure.

2. In the New Measure dialog box, in the Measure name box, type AvgCycleDuration.

3. In the Base data item list, click CycleDuration (OrderMgmt).

4. Click Average, and then click OK.

Create the MyTimeSlice Time DurationProcedure List

1. On the New BAM View: Aggregation Dimensions and Measures page, click New Dimension.

Page 26: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

2. In the New Dimension dialog box, in the Dimension name box, type MyTimeSlice, in the Dimension type list, click Time Dimension, in the Base business milestone list, click received (OrderMgmt), click Year, month, day, hour, minute, and then click OK.

Configure the BAM ViewProcedure List

1. On the New BAM View: Aggregation Dimensions and Measures page, click Next.

2. On the New BAM View: Summary page, click Next.

3. Click Finish.

An empty PivotTable will appear along with a pre-populated PivotTable field list.

4. From the PivotTable Field list box, drag the OrderProgress field onto the Drop Row Fields Here box in the PivotTable.

5. Drag the Count measure from the PivotTable Field list box onto the Drop Value Fields Here box.

6. Double-click the Received cell in the PivotTable to expand it.

You will see three values: Approved, Denied, and Evaluation.

7. Double-click the Approved cell.

You will see two values: DeliveredAck and Fulfillment.

8. Right-click the Approved cell, and then click Pivot Table Options.

9. In the PivotTable Options dialog box, in the Name box, type Order Progress, and then click OK.

This is the name that will identify this particular aggregation in the BAM Portal that will be used later.

10. On the Excel menu ribbon, click the Add-Ins tab, and in the Toolbar Commands section, click the Real Time Aggregation (RTA) button.

11. In the Excel menu ribbon, click BAM, and then click Export XML.

12. In the Export BAM XML dialog box, type OrderMgmt_MyBAMDefinition.xml as the file name, and then save the file to the desktop.

At this point, you can save the Excel workbook with any name you want to the desktop before closing Excel.

Page 27: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

Exercise 3: Deploy the BAM Observation Model

OverviewOnce the business analyst has created the BAM activity and view, an IT professional will deploy the BAM Observation Model to generate the structure of the BAM databases. In this exercise, you will deploy the BAM Observation Model by using the BAM command-line tool.

Deploy the BAM Observation Model Created by the Business AnalystProcedure List

1. On the Start menu, click Run.

2. In the Open box, type cmd, and then press ENTER.

3. In the command prompt window, type cd %BTSInstallPath%\tracking”, and then press ENTER.

4. In the command prompt window, type bm.exe deploy-all -DefinitionFile: “C:\AllFiles\LabFiles\Lab12\OrderMgmt_BAMDefinition.xml”, and then press ENTER.

5. When the command is complete, close the command prompt window.

This task dynamically creates all of the BAM infrastructure needed based on the observation model that was created in Exercises 1 and 2.

Page 28: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

Exercise 4: Map a BAM Activity to the Implementation

OverviewAfter the BAM activity has been deployed by the IT professional, a developer will link the BAM activity to the BizTalk implementation. In this exercise, you will use the Tracking Profile Editor (TPE) to create a tracking profile that maps the BAM activity to a receive port and to an orchestration. You will then apply the tracking profile.

Select the Target BAM Activity for Which to Create a Tracking ProfileProcedure List

1. On the Start menu, click All Programs, click Microsoft BizTalk Server 2010, and then click Tracking Profile Editor.

2. In the left pane, click Click here to import a BAM Activity Definition.

3. In the Import BAM Activity Definition dialog box, in the bottom pane, click OrderMgmt, verify that Retrieve the current tracking settings for this activity definition check box is cleared, and then click OK.

Map the Received MilestoneProcedure List

1. In the Tracking Profile Editor, in the top-right corner, click Select Event Source, and then click Select Messaging Property.

2. In the right pane, expand Schema and MessageProperties.

Here you are mapping the Received milestone defined by the business analyst to an actual step in the business process.

3. Drag the PortEndTime node to the received node in the left pane.

4. In the left pane, right-click PortEndTime, and then click Set Port Mappings.

5. In the Select Ports dialog box, click OrderMgmt_RcvPO, click the > button to map the port, and then click OK.

The port mapping part of this step is necessary because the same order might pass through multiple receive ports. The port mapping specifies the port from which the information will be collected.

Map the City Payload ItemProcedure List

1. Click Select Event Source, and then click Select Messaging Payload.

2. In the Select Event Source Parent Assembly dialog box, under Assembly name, click TheImplementationOfOrderMgmt, and then click Next.

3. In the Select Schema dialog box, under Schema Name, click OrderMgmt.PurchaseOrder, and then click OK.

4. In the right pane, expand Schema, PurchaseOrder, Header, and ShipTo.

Now you will map the City item to actual values from the physical OrderMgmt_RcvPO port configured in the BizTalk Server Administration Console.

Page 29: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

5. Drag the City schema item under ShipTo from the right pane to the City item in the left pane.

6. Right-click City in the left pane (where you just dropped it), and then click Set Port Mappings.

7. In the Select Ports dialog box, click OrderMgmt_RcvPO, click the > button to map the port, and then click OK.

Map Additional BAM MilestonesIn the following steps, you will add BAM milestones to the actual orchestration. You will be able to query BAM for information about messages that were denied and acknowledged. Every order will either be denied or acknowledged, but cannot be both.

Procedure List1. Click Select Event Source, and then click Select Orchestration Schedule.

Multiple orchestrations could exist in the OrderMgmt assembly, so in these steps, you must associate the correct orchestration with the business analyst’s BAM views.

2. In the Select Event Source Parent Assembly dialog box, under Assembly name, click TheImplementationOfOrderMgmt, and then click Next.

3. In the Select Orchestration dialog box, under Orchestration Name, click OrderMgmt.OrderMgmtProcess, and then click OK.

1. Drag the FulfillmentDelay shape from the orchestration to the approved milestone in the left pane.

2. Drag the RejectionDelay shape to the denied milestone in the left pane.

Any order received will reach only one of these milestones because they are mutually exclusive outcomes of a presumed order evaluation—an order is either approved or denied.

3. Drag the SendPOAck shape to the acknowledged milestone in the left pane.

Map the Remaining BAM Activity ItemsIn the following steps, you will associate specific fields from the PurchaseOrder schema to fields in BAM.

Procedure List1. Right-click the ReceivePO shape, and then click Message Payload Schema.

2. In the right pane, expand Schema, PurchaseOrder, Header, and ShipTo.

3. Expand Item and Summary.

4. Drag the State schema item (under ShipTo) to the State data item in the left pane.

5. Drag the Product schema item (under Item) to the Product data item in the left pane.

6. Drag the Amount schema item (under Summary) onto the Amount data item in the left pane.

Create a Continuation

Page 30: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

A BAM continuation is analogous to a correlation set in an orchestration. Continuations are sets of unique values that allow the BAM infrastructure to identify all messages that belong to the same instance of a BAM activity. In this lab, you must define a continuation to indicate that the messages accepted by the receive port belong to the same activity as those that are processed by the orchestration.

Procedure List1. In the left pane of the Tracking Profile Editor, right-click OrderMgmt, and then click New

Continuation.

2. Set the name of the new continuation to OrderMgmtContinuation.

3. In the Tracking Profile Editor, in the top-right corner, click Select Event Source, and then click Select Messaging Property.

4. In the right pane, expand Schema and MessageProperties.

5. From the right pane, drag the InterchangeID node to the new OrderMgmtContinuation node in the left pane.

6. In the left pane, right-click InterchangeID, and then click Set Port Mappings.

7. In the Select Ports dialog box, click OrderMgmt_RcvPO, click the > button to map the port, and then click OK.

This step instructs the BAM infrastructure to initialize the continuation with the value of the message’s interchange ID. The interchange ID is a GUID that identifies this message and any of its descendants.

8. In the left pane of the Tracking Profile Editor, right-click OrderMgmt, and then click New ContinuationID.

9. Set the name of the new continuation ID to OrderMgmtContinuation.

The name of the continuation ID must match the name of the original continuation.

10. Click Select Event Source, and then click Select Orchestration Schedule.

11. In the Select Event Source Parent Assembly dialog box, under Assembly name, click TheImplementationOfOrderMgmt, and then click Next.

12. In the Select Orchestration dialog box, under Orchestration Name, click OrderMgmt.OrderMgmtProcess, and then click OK.

13. Right-click the ReceivePO shape, and then click Message Property Schema.

14. In the right pane, expand MessageProperties, and then drag the InterchangeID node to the new continuation ID node that you just created.

The ReceivePO shape will report the message’s interchange ID to the BAM infrastructure, allowing BAM to associate this message with the correct BAM activity.

Deploy the Tracking ProfileOnce you have deployed the Tracking Profile to the BAM run-time environment, the BAM infrastructure will start collecting data from messages that pass through the business process.

Procedure List

Page 31: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

1. On the File menu, click Save.

2. In the left pane, click Desktop, in the File name box enter OrderMgmt.btt, and then click Save.

3. In the Tracking Profile Editor, on the Tools menu, click Apply Tracking Profile.

4. In the Tracking Profile Editor message box, click OK.

5. Close the Tracking Profile Editor window.

Page 32: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

Exercise 5: Use the BAM Portal to Test the BAM ImplementationThe BAM portal provides users with a Web interface to view the data collected by BAM. In this exercise, you will submit messages, and then use the BAM portal to view the information collected by BAM about the processing of each purchase order.

Generate Initial Inbound Flow of Purchase OrdersProcedure List

1. In the BizTalk Server Administration Console, start the OrderMgmt application.

2. In Windows Explorer, double-click the file C:\AllFiles\LabFiles\Lab12\Messages\Send20POs.bat.

The batch file used here generates 20 test orders so that you will have some data to analyze in this exercise.

Launch the BAM Portal and View Order Progress Data AggregationProcedure List

1. In Internet Explorer, navigate to http://localhost:8080/BAM.

2. In the My Views navigation pane, expand the Sales Manager view.

3. Click the plus sign (+) to expand the function named Aggregations, and then click Order Progress.

4. In the Microsoft Office 2003 Web Components message box, click OK.

If you do not see any data in the Pivot Table View, click the button with the red exclamation point (!) icon in the PivotTable tool bar to refresh the view. Because of SQL Server / OLAP caching, it might take up to one minute for the data to appear.

5. Click the plus signs (+) to expand cells in the PivotTable until Evaluation is shown with a corresponding Total amount.

Generate Another Inbound Flow of Purchase OrdersProcedure List

6. Double-click the file C:\AllFiles\LabFiles\Lab12\ Messages\Send20POs.bat to create and submit 20 new purchase orders.

Review the Detailed Status InformationProcedure List

1. Expand the Column Chooser section, select all remaining items in the Available Data and Milestones pane, and then click the >> button to move them to the Items to Show pane.

2. Collapse the Column Chooser section, and then click the Execute Query button at the top right of the page to run the query again.

The user might want to modify the query itself. Specifically, if the number of items presented by this Show Results action is too large, it might be necessary to use some refinement criteria to limit the list to something workable. For example, of the orders piling up in this processing stage, you might care only about those that have been in

Page 33: Module 12: Enabling Business Activity Monitoringdownload.microsoft.com/.../BT10D_12.docx  · Web viewModule 12: Enabling Business Activity Monitoring. Time estimated: 90 minutes

that stage for more than a certain number of hours. You can refine the query by expanding the Query section of this page and modifying the set of query clauses.