|
Home > Archive > BizTalk Server Orchestration > October 2005 > dynamic routing based no message content.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
dynamic routing based no message content.
|
|
| elixirmike 2005-10-24, 10:32 am |
| Here's the scenario....I have multiple orchestrations setup. I have a single
"master" orchestration which recieves message's of a specific type, let's say
MESSAGE A.
Now, what I want to enable is that the message itself can contain the data
necessary to route to any one of those orchestrations.
So, I have 3 orchestations, labeled Z, X, Y
I have an incomnig message and their is a node in the message called
<LOCATIONS> which has multiple nodes in it corresponding to which
orchestration should be fired. For example:
<LOCATIONS>
<LOC>X</LOC>
<LOC>Z</LOC>
</LOCATIONS>
Since this allows for multiple values, it can't be promoted or setup with a
property schema. In addition, I'd like the solution to enable me to add on
additional orchestrations like M or N...and the message, if it had those
values, would automatically route to the target orchestrations.
This seems like it should be something Biztalk supports...but everything
I've tried either doesn't work, or if I wanted to make changes, it would
require changes in the core XSD and Promoted properteies.
Does anyone know how I could build this solution WITHOUT needing to change
orchestrations, XSD's , etc? So that I could add a new orchestration and have
it direct bind to a message that had the <Locations><LOC> node = to some
value???
Thanks in advance!
| |
| david.grospelier@free.fr 2005-10-24, 10:32 am |
| Hi,
You have to use xpath query in your "master" orchestration to get the
<location> tag value.
For example (in an expression shape) :
locationValue =
xpath(yourmessage,System.String.Format("string(/rootNodeXml/locations/location[{0}]),numLocation);
--> Get the value of the <numLocation> location (begin at 0)
You have to do that in a loop shape so you can access every location
value.
If you wants to count the number of locations :
xpath(yourmessage,"count(/rootNodeXml/locations/location)").
To help you build the xpath query, just go in the property pane of the
location tag in the schema editor and copy/paste the path of the node.
Hope this helps.
David Grospelier
Sword Group
MCP Biztalk 2004
|
|
|
|
|