Geeks With Blogs
Jennifer Zouak JENNIFER · ZOUAK's · BizTalk · and · .NET · column

Tripped on this one again -- the idea is that the orchestration posts a message directly to a message box and from there it is picked up by subscribers. This wasn't working, then when I saved the message out of the HAT, I realized the routing properties weren't being promoted. Sigh. Luckily this excellent blog article popped up. Right, use a correlation set. I can't believe I always forget that. LOL. And I also needed the tip from the comment -- declare the correlation set instance inside a scope (Transaction type=none) so that it will work in a loop.

"Property Promotion inside Orchestration"

Here's my added tip:

I like to declare the correlation type in the same project as the schema and the property schema. I also like to define the ports here. This makes reuse easiler and forces correct naming scheme -- gone are the days of outPrt.Request (PortType1) =WTF?!?  (Since you must declare the type within an orchestration, so often I'll add a "dummy" orchestration in the messaging projects. )

1) Make sure you declare the type as "Public" (default is internal) and 2) After re-compiling the messaging project, you must Unload/Reload the project which has the orchestration (or just reboot LOL!). This allows the new type to be visible/ used.

Also, when one of my developers asked "Are there any other ways to promote properties", the answer is yes:

First realize, the promotion has to happen *before* the message hits the message box.

1. Run the message through a pipeline -- technically can do this in an orchestration, but this sounds like overkill to me.

2. Publish the message to a file folder, have another receive port pick it up using XMLPipeline. This is fragile and overly complex.

3. Write some C# code which can call in an Assign shape from your orchestration. You will need this if you want to do custom promotion (i.e. you cannot automatically promote because of loops,etc) or property Demotion as well, this is likely your only option.  This is too complex and time consuming for ordinary stuff -- consider using a map to manually copy THE needed properties out of the looping body to a header/envelope and promote from that instead.


Posted on Saturday, November 8, 2008 6:35 AM BizTalk , BizTalk New User (Newbie) | Back to top

Comments on this post: Routing when using direct port

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Jennifer Zouak | Powered by: