Oct 212014
 

“How do I log data as it flows through the ESB? If I look at the data that is stored in the BAM Activities that come out of the box with the ESB, all I see is GUIDs. Yes, I can tell which itineraries run, when they start and finish, but that information doesn’t help me at all, I need to have some data attached to the message to be able to track.”

This is the first question we encountered when we first demonstrated our ESB Vision to United Healthcare.

This entry is the first of two regarding logging. We are going to drop an Itinerary Service shape on the Itinerary Design surface, and name it Log Information. I am going to choose the Logging Messaging Extender

image

If there are other things that need to specify:

  • If I am planning on logging additional information, I want to enable Continuation
  • In the Service Name I choose the On-Ramp

image

  • In the Service Name I choose the Messaging Logger

image

  • I want this step to be logged in the default Itinerary Tracking activity, so I choose to Enable Tracking
  • If I want to store the actual payload of the message within this BAM activity, I choose True on Storage

image

This allows me a point in the flow to store data, however we haven’t defined what actual data we are going to store. I can add an infinite number of items. Let’s add two, the last name and the original file name.

Create a resolver and choose the Context Logger Resolver Extension

image

I specify the BAM Type as NVARCHAR[50]

image

But let’s change the length by pressing the + sign, and give it a friendly name, this is the column header that is going to show up in the portal

image

Now we need to choose the context property, I simply drop the context property for the Context Properties:

image

Now lets add another resolver and choose XPath Logger Resolver Extension

image

I fill in the rest,

  • Data Type: NVARCHAR[50]
  • Friendly Name: Name
  • Part Number: 0 (for multi-part messages you can change the index, we have a client using this for HL7)
  • Xpath: /*[local-name()=’Order’ and namespace-uri()=’http://ExternalInterface.Definition’]/*[local-name()=’Name’ and namespace-uri()=”]

image

 

Here is what it looks like in the portal

image

and

image