Search BrianLoesgen.com
Categories
Archives
Monday
Mar032008

ESB Guidance 101: File receive, dynamic endpoint resolution via rules engine

There was a message at the Codeplex site from someone having issues doing a simple "receive file from folder, do dynamic endpoint resolution and deliver message". I threw together a little sample showing how this works, and blogged about it in case others need this too.

The moving parts involved are:

  • receive location using the ItineraryReceivePassthrough pipeline
  • dynamic send port using the ItinerarySendPassthrough pipeline

How it works:

  • the message is received
  • the ESB Dispatcher Disassembler calls the Resolver specified in the Endpoint (in this sample, the business rules engine, see below)
  • the Resolver invokes the rules policy
  • the AdapterProvider framework sets appropriate outbound adapter information
  • the message hits the MessageBox
  • a send port subscribes to all messages from that specific receive location
  • the message is delivered

The receive configuration looks like this:

image_thumb[2]

 

(full endpoint value is "BRE:\\policy=Microsoft.Practices.ESB.Test;version=;useMsg=;MessageExchangePattern=;")

Next, using the BizTalk Admin tool, right-click your test application and add a reference to the Microsoft.Practices.ESB BizTalk application. That way you'll be able to access the resources it contains, including the pipelines. We will need this for the next step.

The send side looks like this (note that there are no values set in the per-instance properties):

image_thumb_1[2]

 

Then, of course, we need a filter condition to link them together:

image_thumb_2[1]

 

The ultra-complex rules policy :) looks like this:

image_thumb_3[2]

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>