With this title I am making reference to an error we have when we try to track data from some shapes in a BizTalk application. The following code is a complement of an additional information that we got with this error.
Exception type: BAMTraceException
Source: Microsoft.BizTalk.Bam.EventObservation
Target Site: Microsoft.BizTalk.Bam.EventObservation.BAMTraceFragment CreateTraceFragment()
The following is a stack trace that identifies the location where the exception occured
at Microsoft.BizTalk.Bam.EventObservation.TraceInstanceToken.CreateTraceFragment()
at Microsoft.BizTalk.Bam.EventObservation.TraceReferenceTrackPoint.Execute(EventStream eventStream, IBAMDataExtractor extractor, Object location, Object data)
at Microsoft.BizTalk.Bam.EventObservation.BAMInterceptor.Microsoft.BizTalk.Bam.EventObservation.IRawStreamInterceptor.OnStep(IBAMDataExtractor extractor, Object location, Object data, Stream eventStream)
at Microsoft.XLANGs.Mozart.BIWrapperInterceptor.TrackEventHandler(Location loc, EventData data, Stream trackData)
at Microsoft.XLANGs.Core.Events.FireEvent(Location location, EventData args, ITrackStreamDispenser trackData)
Before explain what the reason is to get this error when we are tracking data from BizTalk I would like to give a little bit more context about BAM (Business Activity Monitoring) and TPE (Tracking Profile Editor) to get a better understanding of it. The TPE is a developer tool. Basically it is a graphical tool use to specify the orchestrations, ports and messages that are sources of the data captured by BAM.
I will place particular emphasis in something very important to know about TPE: The TPE is only used when we are going to capture data from BizTalk application. This special emphasis is because BAM is a very powerful tool, with this one we can monitor WCF (Windows Communication Foundation), .NET Application and WF (Windows Workflow Foundation) as well, but we have to know which is the tool to do it, which for those cases is not the TPE.
When we use the TPE the following data sources types are displayed and we can use to track:
- Orchestrations
- Message payload schemas
- Context property schemas
- Message property schema
In another way, some message such a string type or System.XML.XMLDocument can’t be tracked with TPE. Only we can track messages that have a schema that is known at design time.
We can’t track any of the following orchestration shapes:
- Group (Task)
- Loop (While)
- Message assignment
- Suspend
- Terminate
- Throw exception
- Transform
In this stage when I have written about what we can do and don’t with the TPE, I will come back to the beginning of this post, the error I got doing a tracking!!. I got this error because I was trying to put and interceptor in a send shape (this shape allows us to track data without any problem), the real problem was that the send shape was inside the Group shape, and how we saw before in this post we can’t track data from this shape. This is a BAM limitation – Tracking data from some BizTalk application shapes!