Custom BAM and making it really work

July 20, 2009 / Comments Off on Custom BAM and making it really work

I have a solution where I use BAM to build a complete audit trail of a message flow.

Custom components write a message to a predefined BAM view whenever you want it to. Normal points where you would use
this functionality is in receive & send pipelines. And if an important business decision was made you could write that to the
audit trail as well. Below is an example of how to do this in an expression shape inside an orchestration.

AuditData(XlangMessage,”The order was rejected because of <Some reason>”,bool includeMessage)

By doing it like this you can have a very nice Audit trail for every BizTalk solution without doing too much for it. I was very happy with the Audit trail
created by the applications that used the custom BAM solution. However a person dealing mainly with functional support would want some
added functionality. The wish to add functionality to an entry in BAM stayed in the back of my head and after a while I read a very good article by Gregory van de Wiele
and thought it would be nice to indeed have links that really worked.

 After applying his tips I was able to add some extra functionality to the BAM page. Below is an example of this.

  • View Audit trail in Audit portal is a hyperlink that will jump to a website that is designed to show an audit trail of a message.
  • View Errors in FaultPortal (If any) will show all the errors that have occurred.
  • View entire message will use Gregory’s tip and show you the entire message. (the field longreferencedata contains the original message)
    Below is an example of this.

 So now i was able to give the end user some useful information. He could see the entire audit trail in the Audit Portal
(which is just another faster view on the same BAM table) , See messages in the FaultPortal (if there were any) and
he could see the entire message. But what if the end user had a question about this record.
There is a nice button on the bottom of this screen ‘Request technical assistance’. as seen in the screenshot below.

I clicked this button to see what would happen, but the only thing I could see was the following message.

BAM would give me only a message stating that some of the reference data was not found. What kind of reference data I was wondering.
So I did the same as Gregory, and did some reflection on BAM. And then it became clear to me. Since the entry in BAM was not put there via a regular tracking profile,
some data needed there was not present. After some sniffing around with Reflector i could see that the ‘Technical Assistance’ button
was relying on ‘BizTalkService’ and ‘MessageId’ (all case sensitive). So I used Gregory’s post to fill those as well.

 After these adaptations the entry in BAM has gained in functionality.

  • Show complete Audit trail
  • Show errors if there are any
  • Show entire message
  • Call for technical assistance

So a person who is dealing with mainly functional issues could see all the date he needs to see. And if he thinks a problem has a technical background,
he could call the guys who are responsible for the technical support like this.

This will result in a message in the eventlog like this :

If the people who are responsible for technically monitoring BizTalk have SCOM setup properly they could
easily have an alert raised for these kind of messages and respond to them.
So you will have a link from functional support to technical support without doing anything for it.

  • Recent Posts
  • Recent Comments
  • Archives
  • Categories
  • Meta