Eric Stott

Jun 072017
 

As part of the setup of ESB Vision, there is a setting so that developers can see exactly what is going on in their development environment.

This results in the following:

If it is unchecked:

The same for receive and send ports.

Jan 042016
 

I was building a sample for the ESB Vision and I wanted to send data to a database.
EASY

I just need to use the WCF-Custom adapter provider

When I copied the settings from the auto generated binding file like I documented ESB Hints

The part that i was moving was

 <StaticAction vt=8>

    <BtsActionMapping xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd=http://www.w3.org/2001/XMLSchema>

      <Operation Name=Select Action=TableOp/Select/dbo/adm_Adapter />

    </BtsActionMapping>

  </StaticAction>

Which ended up as

When I ran it an exception was thrown

Error 194200: Target Namespace not found for Action set in Pipeline
What I ended up doing was surrounding the Action with curly braces


Oct 212014
 

“I have a web service that I need to connect to in this process, try how do I do it using the ESB?”

We at Stott Creations spent probably the most time on this topic.

Our first inclination was to use a request response off-ramp.

We quickly discovered that the whole off-ramp was designed with the (misguided) understanding that the web service you were connecting to was going to pass back all of the data you needed along the bus.

I have never seen this to be the case. An shipping verification hosted by UPS does not have the capability to handle the data flowing on the ESB, vialis 40mg nor do I really want that data going out to a third party web service.

We have a standardized way of calling request-response end points, even one-way endpoints.

I drop a Itinerary Service onto the Itinerary Surface and name it Call External WS

image

Set the Service Name to StottCreations.ESB.Orchestration.Send

image

I set the following:

Tracking Enabled: True – I want to see the status of this step in the Portal

Storage: True – I want to see the the entire payload stored in the BAM Activity

Reprocessing Behavior: Stop – If an exception happens, what should I do?

  • Stop: Stop processing and wait for resubmission to continue
  • Continue: Mark it as an error, but don’t stop processing, continue on (another blog post will explain further)
  • Reset: The standard approach for the ESB Toolkit: if an exception happens, start the itinerary from the beginning when the issue that caused it to fail is fixed

image

There are two to three resolvers that need to be added.

  1. Map to create the request message
  2. End point settings
  3. (optional) Merge map that takes the response and merges it back to the message flowing on the bus

So let’s create a resolver called Make Request, use the static resolver, and choose InternalInterface.CanonicalToExternalWS

image

Now lets add a new resolver for defining the end point.

image

I follow the same steps to define the endpoint as documented in the ESB Hints post

The next (optional) step is to create a merge map.

Essentially, I am going to take the response from the web service and merge it into the original message that was on the bus.

I create a temp orchestration and define my two messages:

  1. OriginalMsg
  2. ResponseMsg

image

I create a transform shape and define it to take the OriginalMsg and the ResponseMsg creating the OriginalMsg

image

image

I open the map and create the mapping:

image

Delete the orchestration, and deploy the map.

Now point to the map in the last resolver (called Merge Response)

image

Oct 212014
 

“During development, stuff I want to see what the data looks like at every step along the way, is there a way to do that?”

In most extensions with the ESB Vision product, there is a Payload property.

Samples include:

Logging Messaging Extender

image

Reprocessing Orchestration Extender

image

Orchestration Broker

image

Messaging Broker

image

Logging Orchestration Extender

image

Payload Orchestration Extender

image

Reprocessing Orchestration Extender

image

To disable all logging, simply open up the esb.config change this entry to false

image

To see the data, simply look up in the BAM AllRelationships View

image

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

Oct 212014
 

This is part 2 of the logging features. If I want to log data mid itinerary, buy cialis I want to use the Orchestration Logging Step

I drag the Itinerary Service onto the Itinerary Design surface and choose Logging Orchestration Extender

image

Since I am not going to log anything after this I am not enabling the Continuation

image

I want the step to show up on the portal, decease so I choose to have Tracking Enabled, and I for at least development, I want to see what data is being passed through the bus at this step so I set Storage to True

image

 

I connect the other shapes, and part of the product is the ability to create the Activities:

I choose one of the following Exporters:

image

If I choose the XML Itinerary Exporter, it places a series of defaults, to be discussed further in a later post

However, what I am most interested in is the BAM Activity XML file. This is the name of the Itinerary saved in your Documents folder.

image

If I choose Database Itinerary Exporter I have a few additional settings.

  • Activity Overwrite: should it remove the currently deployed activity and re-deploy
  • BAM Primary Import Database: the default BAM Primary Import DB

image
Here is the completed Itinerary Orchestraiton Broker

If I export the Tracking File Exporter, I get the itinerary and all of the items for caching, but I also get the Activity for me to deploy to other environments

image

Oct 202014
 

“What happens when one of our end-points are unavailable?”

This is a very common scenario, sick there is another similar regarding bulk resubmission.

I am going to turn off one of the web services and submit a message.

image

I click on the Fault and see the following:

image

I turn the app pool back on and press Resubmit, dosage notice the status has changed from Red to Yellow

image

Once I press OK, case this is what I see:

image

Oct 202014
 

“What happens when bad data is passed through the ESB, dosage can I correct it? How can I correct it? When it is put back on the bus, case where does it resume?”

I submitted a message and it shows up as a red X.

I click on the details and notice what I can see:

  • What step it failed
  • When the step failed
  • The message that was on the bus when it failed

BadData1

If I look at the fault, dosage I can get more details of what happened:

BadData2

 BadData3

Notice that the message on the bus is different from the Request. I can’t change the actual Request, I need to go and change the message on the bus: that Order Number needs to be numeric. As I go and make modifications to the message, it shows what fields I have touched.

BadData4 

I press Save

BadData5

And Resubmit

BadData6

Oops, got a different fault: notice that it handles standard and custom faults in a standard way:

BadData8

Let me fix that and resubmit. Notice is shows when it was resubmitted, who did it, and when.

BadData9

I can click on each of the faults and see the actual Faults, but I can’t resubmit it.

If I wanted to modify or look at the XML that was on the bus directly, I click on the Raw button:

BadData10

Oct 202014
 

“How do you handle a mass issue, check what if a web service is down and I generally have thousands of messages that are suspended, purchase since the ESB exception handling process takes the message out of the msgbox, decease how do I resubmit all of the messages?”

Here I turned off one of the web services and submitted a bunch of messages (in this case 30).

BulkBad1

BulkBad2

If I go and choose the check mark on the black line

BulkBad3

And press the Resubmt button, this is what you see:

BulkBad4

If you go into any of the details on any of them and see that it was me that resubmitted it, and that it completed successfully

BulkBad5

Oct 202014
 

“What happens if you want to ignore a message?”

This is generally a big ask, buy the situation is where a bad message comes in. It shows up as a Red X and alerts have gone out. After researching, ed instead of fixing the issue, click a completely new message is submitted.

This is easy done. We will submit a bad message:

Bad1

Now the message was resubmitted, but I don’t want anyone to accidently resubmit the message that failed:

Bad2

So I go into the flow that failed, and click on the Info button

 Bad3

Which turns it to Blue (notice you can’t resubmit it, and it marks it as me as the person who touched it):

Bad4

Also from the main screen:

Bad5

I could revert and resubmit it.