locked
BAM: Simple Tracking of a Message: How To Implement via Tracking Profile Editor? RRS feed

  • Question

  • Hi,

    I want to create a BAM Activity that does this:

    a) On message receipt on BizTalk port, record some data from the message content (via schema extraction) and set a milestone of "Received".
    b) On sending the message via a send/receive port, set another milestone to say "Sent".

    Ideally I just want one record in the BAM view, showing received time, sent time & some business data. No orchestrations are involved.

    I have created a simple BAM Activity via Excel & deployed to BAM. I am now trying to use the TPE to record the data. So far I have managed to record a record on message receipt, extracting the business data & set the Received milestone. I have 2 questions:

    a) How to set the "completed time" milestone.
    Ideally I want to set this on receipt of the response back from the send/receive (getting a response back means that the message has been sent). What BizTalk property can I use to set my completed milestone?

    b) How to Link the 2 events
    How do I ensure that when I set the "completed time" milestone, it sets the value in the record written on message receipt? How do I implement this "continuation"? Is there a way to do this using standard BizTalk context properties somehow?

    A simple scenario, but the documentation I have on BAM launches off into far more complex stuff - I just want a solution that works in a messaging only environment.

    Many thanks
    Thursday, February 11, 2010 6:43 PM

Answers

  • Did you create a progress dimension in your Tracking Definition (in Excel)?  Did you just want to have another milestone for the completion or a progress dimension? 

    On the tracking side you'll need a continuation and continuation ID both named the exact same thing.  The continuation is populated in the Receive (the start) the Continuation ID in the second step.  It sounds like you want to track three milestones to me: receive, send, receive response.  I think you can do this all with InterchangeID.  I can't recall off hand if the response from the Send Port will have the same Interchange ID, but I really think it does. 

    Lastly remember the way BAM tracks to schema:  http://www.novaenterprisesystems.com/Blog/post/BAM-Schema-Binding.aspx that means that on the initial receive you'll track on your Post Map schema (i.e. internal) but on the response from the Send Port it will be Pre Map (external schema). 

    Kind Regards,
    -Dan

    Thursday, February 11, 2010 6:51 PM

All replies

  • Did you create a progress dimension in your Tracking Definition (in Excel)?  Did you just want to have another milestone for the completion or a progress dimension? 

    On the tracking side you'll need a continuation and continuation ID both named the exact same thing.  The continuation is populated in the Receive (the start) the Continuation ID in the second step.  It sounds like you want to track three milestones to me: receive, send, receive response.  I think you can do this all with InterchangeID.  I can't recall off hand if the response from the Send Port will have the same Interchange ID, but I really think it does. 

    Lastly remember the way BAM tracks to schema:  http://www.novaenterprisesystems.com/Blog/post/BAM-Schema-Binding.aspx that means that on the initial receive you'll track on your Post Map schema (i.e. internal) but on the response from the Send Port it will be Pre Map (external schema). 

    Kind Regards,
    -Dan

    Thursday, February 11, 2010 6:51 PM
  • Dan,

    thanks for the suggestion. InterchangeID seems a good value to use - that value seemed to be consistent on a receive (start BAM milestone) > send > receive (End BAM milestone) message flow. Its weird having to name the Continuation and ContinuationID the same - once you have created them in the TPE there is no easy way to tell which one is which, the icons not being of use if you aren't familiar with them. To set received time I chose Messaging Property > PortStartTime and for Sent time I chose PortEndTime : I don't know if these are the best values to use, but the MS docs are very quiet on when you can use the system properties or which ones are best for time measurement (in "Message Context Properties" I don't see these properties mentioned), though I have found another thread where these have been recommended (http://social.msdn.microsoft.com/Forums/fi-FI/biztalkgeneral/thread/e09ae1c5-c333-4f9b-965f-4ed11d03582a) for a very similar scenario.

    It would be great to know exactly when the BAM tracking is performed during the receive and send process. For example, on receive I tried to include a context property that is set via a pipeline (from the MS ESB property schemas), but nothing was sent. So is BAM tracking done after the adapter but before the pipeline? Or somewhere within the pipeline?

    I find the TPE weird too. If I click the "Click here to select an event source" in the centre of the right hand pane, I can select my XML schema DLL, but then it displays another box asking for the name of an Orchestration. I have to use the "Select Event Source" button instead to be able to get at the XML schema content. Very inconsistent.

    In the "How to Create a Continuation" help it says nothing about the fact you have to right click each data item and select a port. And that port selection dialogue box! Why are the selection windows so small you can't see the full name of the ports? Don't they know we no longer use 640x480 screens? What about a resizable panel?

    Given the lack of some simple worked examples like the scenario I am attempting it is no wonder not many people know about or try implementing BAM, which is a great shame since it is pretty straightforward to collect lots of useful business data.

    BAM could definitely do with a GUI to help manage the activities & views. Don't scrap the command line - developers need this to script deployment. They merged HAT into the Admin MMC, BAM and TPE need the same.

    Sorry for my rant, but if the BAM developers at MS want people to use what they produce, they need to bring it into the C21!

    C.
    Friday, February 12, 2010 2:47 PM
  • Hey no worries.  Rant welcome to me.  I love BAM, it is awesome.  More than awesome.  What it's really doing behind the scenes is even cooler than what we know / see. 

    Sadly it does have some issue, many being resolved, but the TPE... that's the big one.  If a new TPE isn't created soon I'm really tempted to do one myself.  With my luck though, a great new MS one would be created right after I did. 

    The .btt file is really a pretty simple XML and it's really quite easy to see what's going on in the binding.  Maybe if I get the free time it would be cool.  Tell you what, if I find out there are no such plans to improve the TPE I will do this!

    My biggest issue with BAM is the learning curve with it can be steep (the docs don't help, but there is a good book out there now), but once you know it really rocks. 
    Friday, February 12, 2010 5:28 PM