A recent post was written about attempting to query the DTADB database to capture data and send it to a particular customer. I suggested that this is a purpose in Business Activity Monitoring. I have created a sample application that demonstrates some of the powers of BAM.
In this example orders are processed by Biztalk, and key data elements are extracted and sent to the BAMPrimaryImport database.
Another orchestration takes the information in the database and creates a report and sends it out to the customer.
- Download this file.
- Run the following command from a dos prompt to create the necessary BAM objects: \Tracking\BM.exe deploy ..\BAMReporting\ActivityInfo.xml
- Run the extractBAM.sql against the BAMPrimaryImportDb
- Deploy the solution
- Modify the binding.xml file to represent your enviornment
- Bind the ports using the Deployment wizard.
- Enlist the orchestrations
- Drop Order 1.xml, Order 2.xml, and Order 3.xml into the Input folder
- Wait and then drop the Confirmation 1.xml, Confirmation 2.xml, and Confirmation 3.xml into the Input folder
- Drop the Trigger.xml file into the input file and in the output folder there should be an email xml file that shows various BAM data.
This actually goes against my better concience on at least 2 fronts:
- BizTalk has the ability to do a lot of things, but sometimes it shouldn’t. I know of some people think that it is better than sliced bread, but a more elegant solution would be to use SQLReporting services that would go against the BAMPrimaryImportDB
- It uses a trigger file to kick off the report, there could be a better way, with a proper stored proc to do some marking of the data so no duplicate reports get run