Itinerary Selector Component
Ok – A bit of theory here. So, you need a way to attach an itinerary to an incoming message using the ESB. The ESB Itinerary Selector component gives you this capability. It is placed in the receive pipeline and has three properties (ref: MSDN):
1) IgnoreErrorKey: This property defines whether, if an error is returned by the resolver, the message should be processed without the itinerary (when set to True) or suspended
2) ItineraryFactKey: This represents the key in the dictionary returned by the resolver that contains the actual XML of the Itinerary selected. Generally, Resolver.Itinerary, unless a custom resolver is used
3) ResolverConnectionString: Figures out the itinerary that should be attached to the incoming message. This is a resolver connection string that contains name-value pairs that a resolver can use to select and/or look-up an itinerary. This in turn executes either the Static or Business Rules resolver, which provides an itinerary name (and version number). The ESB Itinerary Selector component then uses this name and version information to load the requested itinerary from the Itinerary Database
Sample ResolverConnectionString
-
ITINERARY:\\name=myHardCodedItineraryName;
-
BRI:\\policy=MyPolicy;version=1.1;useMsg=False;
When useMsg is set to False, the BRI resolver submits the message’s context properties into the rules engine to determine which itinerary to use. If you want to use content from the body of the message to make these decisions, then you would need to set the useMsg property to True. This instructs the BRI resolver to submit the message body as well as the context properties into the invoked policy.
Using the BRI resolver
This requires the usage of the ESB.Itinerary vocabulary, which would set the name and version of the itinerary that we want to use. This vocabulary provides two core functions called Set Itinerary Name and Set Itinerary Version. You use these functions in the Actions section of a rule to define which itinerary you want to use
None the less – its fantastic
Top post demonstrating 2 way sync response
Routing 2-way Synchronous response to endpoints other than the initiator