i was reading some stuffs on net about this, and came across following post , it is great , i tried with some code and it did not work at all.............
spend some time to figure out why it is not working....
then
.. i realized that the property is not getting promoted at all...
so .. i figured out the gotcha in this post...
some thing is missing...
Moral of the story--- need to create a correlation set then assign that correlation on set port to promote the values.....
and it worked...
so ... following rules to follow...
scenario1- i want to implement content based routing , using a custom property which is not present in the schema ( so in message) and i can not modify the schema as it is from third party schema.
So what will i do...?
1- create a property schema.
2- cerate a element in the property schema say "EmployeeType" ( so it will be available in the orchestration expression shape to modify or set)
3- there is property of the newly cerated element ( on step2) called "MessageContextPropertyBase" set its value to "MessageContextPropertyBase" now what is this...? msdn says this property indicated biztalk base class which is used when generating .net type of this property.
4- open your schema, and refer to this property schema ( click root node of the schema->Promote->show Promotions , this opens a new window , click on "Property Fields" on the right hand side tab, click on the folder icon, and browse for the property schema , which you have created on step 1 )
5- build the schema project.
6- open the orchestration where you want to publish the message.
6- in the message assignment shape
message_1(... .EmployeeType ) = set the value..
7- till here everything is fine and great.
8- now how the property will be promoted. yes assigned the value, but how it will be promoted for the content based routing.
9- i think message box will be promoting it ??? right.
10- so create a new "Correlation Types"
11- in the correlation properties select the property which you want to promote (select the created property from the property schema)
12- create a new correlation set, select the created correlation type ( crated on step 10).
13- final .... select the send shape which is sending the message to message box, and set the "Initializing Correlation sets" property to the cerated correlation set on step 12.
build the solution deploy and test it... by setting the filter property on send ports...
enjoy...
No comments:
Post a Comment