Monday 25 September 2017

End-To-End Tracking BizTalk Server Message Consumption Using Business Activity Monitoring (BAM)

This tutorial contains step by step guide how to do End-To-End tracking of message flow through receive port, send port and orchestrations using Continuation and BAM.

1.     To add the BAM add-in to Excel 2016

                    I.            In Excel 2016, click file ‘Options’ under file Menu.
                  II.            In the Excel Options dialog box, click Add-Ins.
                III.            In the Add-Ins pane, click Go.

                IV.            In the Add-Ins dialog box, select the Business Activity Monitoring check box, and then click OK.



2.     Defining a Business Activity

        I.            Open Microsoft Excel.

      II.            On the menu tool bar, click BAM Activity under BAM under the ‘Add-ins’ menu item.

a.      The Business Activity Monitoring Activity Wizard appears.

    III.            Click New Activity.

a.      The New Activity dialog box appears.

    IV.            Type a descriptive name for the activity in the Activity Name text box.

2.1 Creating new item

                    I.            Click New Item.

                  II.            In the New Activity Item dialog box, in the New Activity Item box, type a descriptive name for the activity item.

                III.            From the Item type drop-down menu, select a type for this item. Possible values include:


Item type
Description
Business Milestone
A date/time value. For example, an approval date for a purchase order.
Business Data – Text
A string containing any alphanumeric characters. For example, Ship to: City,
State/Province and Zip/Postal code.
Business Data – Integer
A whole number value. For example, the total number of purchases.
Business Data – Decimal
A decimal value. For example the total dollar amount of the PO.

If you select the item type "Business Data – Text", you must enter the maximum number of characters for the string in the Maximum length box.

                    I.            Repeat steps 1 through 3 to add as many items as needed to this activity.

                  II.            After you complete the Business Activity Monitoring Activity Wizard, the Business Activity Monitoring View Wizard starts automatically.

3.     Deploy the activity into BizTalk

                    I.            Open the excel sheet containing BAM Activity.

                  II.            On the menu tool bar, click export XML under BAM under the ‘Add-ins’ menu item.

                III.            Open the Command prompt and change the directory to BizTalk

a.      cd C:\Program Files (x86)\Microsoft BizTalk Server 2016\Tracking

b.      Prompt:

c.       bm deploy-all -DefinitionFile:D:\BAM\Activity.xml



Below two commands can be used to remove the activity or view.

bm remove-activity -Name:NaqabaConfirm

bm remove-view -Name:NaqabaConfirmV

4.     Generate Tracking profile

                                I.            Open the Tracking profile editor from start menu.

                              II.            Click on ‘Click here to import a BAM Activity Definition’ to select the activity we created above.

                            III.            Click on ‘Click here select an event source’, select the required orchestration from required solution/project.

                            IV.            Drag the items from orchestration to activity that we want to capture. For time related fields needs to drag and drop directly, on the other side if we want something from schema we need to right click on the Send/Receive and select ‘Message Payload schema’ and drag the required element.

                              V.            Click ‘apply Tracking profile’ under Tools menu.

                            VI.            Deploy the BizTalk Project/solution.

To open BAM portal in IE, it's must to enable the ‘compatibility mode’ in Internet Explorer by clicking Compatibility View settings under Tools menu.

Finally the activity we created looks like in BAM portal: